Skip to content
Snippets Groups Projects
Commit c1145436 authored by Andrew Rudenets's avatar Andrew Rudenets
Browse files

Исправление багов, vol.6: авторизационные войны

parent 7fcbbef6
Branches
Tags
No related merge requests found
......@@ -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`;";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment