diff --git a/.gitignore b/.gitignore index 8247f97b2443891fb4069a2fc6c41b3d0c326b90..342e1cbc2330fef0521ed59857c785d6976733fd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,5 @@ ~dev_rating/modules/kotwig/cache/ nbproject/ *.*~ -~dev_rating/.htaccess /.project diff --git a/db/Sample.sql b/db/Sample.sql index 52a06877dbe3d7110f8575fd2ed0581c559a3080..95bd8d6780950eaa6b70c87eeb3551fa9952dff7 100644 --- a/db/Sample.sql +++ b/db/Sample.sql @@ -53,8 +53,8 @@ INSERT INTO `degrees` (`ID`, `Name`) VALUES -- INSERT INTO `faculties` (`ID`, `Name`, `Abbr`) VALUES -(1, 'Математика Механика Рё РљРќ', 'МехМат'), -(2, 'Юридический факультет', 'ЮрФак'); +(1, 'Рнститут математики, механики Рё компьютерных наук', 'Мехмат'), +(2, 'Юридический факультет', 'Юрфак'); -- -- Дамп данных таблицы `departments` diff --git a/~dev_rating/application/classes/Controller/UserEnvi.php b/~dev_rating/application/classes/Controller/UserEnvi.php index ca3de6681995999329265ff0891f3cd996faf4da..403f538625e004d02b263420ee28207a33cf38b8 100644 --- a/~dev_rating/application/classes/Controller/UserEnvi.php +++ b/~dev_rating/application/classes/Controller/UserEnvi.php @@ -5,12 +5,14 @@ class Controller_UserEnvi extends Controller { public function before() { - if(!Account::instance()->isSignedIn()) + if(!User::instance()->isSignedIn()) { - $this->redirect('sign', 302); + //$this->redirect('sign', 302); + throw new Kohana_Exception(); } else { + // Проверка РЅР° $this->UserInfo = User::instance()->getInfoAsArray(); // Проверка РЅР° доступ Рє странице diff --git a/~dev_rating/modules/account/classes/Kohana/User.php b/~dev_rating/modules/account/classes/Kohana/User.php index 1be2f51e3dd4dcafac4e442fe576f3f5127df6c2..6e4cd21824402569ed1d018e844459503a891da9 100644 --- a/~dev_rating/modules/account/classes/Kohana/User.php +++ b/~dev_rating/modules/account/classes/Kohana/User.php @@ -81,13 +81,13 @@ class Kohana_User implements ArrayAccess { if($id == -1) return false; else - return $this->completeSignIn ($id, $this->hash($password)); + return $this->completeSignIn($id, $this->hash($password)); } protected function completeSignIn($id, $passhash) { $userHash = $this->hash($id.Request::$user_agent.Request::$client_ip).$this->_config['hash_key']; $passhash = $this->hash($passhash.$this->_config['hash_key']); - Cookie::set('userhash', $passhash); + //Cookie::set('userhash', $passhash); $this->_userInfo = $this->_getInfoFromDB($id); $this->_session->regenerate(); $this->_session->set('ID', $id);