Skip to content

Commit

Permalink
Доработки по пользователям. closed #256, closed #275
Browse files Browse the repository at this point in the history
  • Loading branch information
adminnu committed Aug 28, 2012
1 parent fa05f32 commit 761d13e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protected/modules/install/controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ public function actionCreateuser()

if (Yii::app()->request->isPostRequest && isset($_POST['CreateUserForm']))
{
// Чистим сессии всех пользователей
$_SESSION = array();

$model->setAttributes($_POST['CreateUserForm']);

if ($model->validate())
Expand Down
6 changes: 6 additions & 0 deletions protected/modules/user/components/YWebUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ public function isAuthenticated()

$authData = $this->getAuthData();

if(!User::model()->findByPk($authData['id']))
{
$_SESSION = array();
return false;
}

if ($authData['nick_name'] && isset($authData['access_level']) && $authData['loginTime'] && $authData['id'])
return true;

Expand Down

0 comments on commit 761d13e

Please sign in to comment.