From c11454363a2ed30bcea89cab2847f5b84e399041 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A0=D1=83=D0=B4?=
 =?UTF-8?q?=D0=B5=D0=BD=D0=B5=D1=86?= <andrey.rudenets@gmail.com>
Date: Sun, 24 Aug 2014 00:23:12 +0400
Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?=
 =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2,=20vo?=
 =?UTF-8?q?l.6:=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B8=D0=B7=D0=B0=D1=86?=
 =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=B2=D0=BE=D0=B9=D0=BD?=
 =?UTF-8?q?=D1=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../modules/account/classes/Model/Kohana/Account.php        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/~dev_rating/modules/account/classes/Model/Kohana/Account.php b/~dev_rating/modules/account/classes/Model/Kohana/Account.php
index 206717aac..4292d076b 100644
--- a/~dev_rating/modules/account/classes/Model/Kohana/Account.php
+++ b/~dev_rating/modules/account/classes/Model/Kohana/Account.php
@@ -16,6 +16,12 @@ class Model_Kohana_Account extends Model
         return $key->get('Key');
     }
     
+    public function checkAuth($login, $password) {
+        $sql = "SELECT `SignIn`('$login', '$password') AS `ID`;";
+        $login = DB::query(Database::SELECT, $sql)->execute();
+        return $login->get('ID');
+    }
+    
     public function createTeacher($lastName, $firstName, $secondName, $degreeID, $departamentID, $activationCode)
     {
         $sql = "SELECT `CreateTeacher`('$lastName', '$firstName', '$secondName', '$degreeID', '$departamentID', '$activationCode') AS `UserID`;";
-- 
GitLab