* when identify a user, fetch groups of him thus when check priv of projects, use groups stored in session.
This commit is contained in:
@@ -360,6 +360,7 @@ class user extends control
|
||||
{
|
||||
/* Authorize him and save to session. */
|
||||
$user->rights = $this->user->authorize($account);
|
||||
$user->groups = $this->user->getGroups($account);
|
||||
$this->session->set('user', $user);
|
||||
$this->app->user = $this->session->user;
|
||||
$this->loadModel('action')->create('user', $user->id, 'login');
|
||||
|
||||
@@ -305,6 +305,7 @@ class userModel extends model
|
||||
if(!$user) return false;
|
||||
|
||||
$user->rights = $this->authorize($account);
|
||||
$user->groups = $this->user->getGroups($account);
|
||||
$this->session->set('user', $user);
|
||||
$this->app->user = $this->session->user;
|
||||
$this->loadModel('action')->create('user', $user->id, 'login');
|
||||
@@ -324,6 +325,7 @@ class userModel extends model
|
||||
if(!$user) return false;
|
||||
|
||||
$user->rights = $this->authorize($account);
|
||||
$user->groups = $this->user->getGroups($account);
|
||||
$this->session->set('user', $user);
|
||||
$this->app->user = $this->session->user;
|
||||
$this->loadModel('action')->create('user', $user->id, 'login');
|
||||
|
||||
Reference in New Issue
Block a user