forked from science-ation/science-ation
Fix updateSessionRoles once and for all
This commit is contained in:
parent
759ecc0a1a
commit
ab068fdfbb
@ -906,15 +906,17 @@ function try_login($user, $pass)
|
||||
/* Login successful */
|
||||
return $r['id'];
|
||||
}
|
||||
|
||||
function updateSessionRoles($u=null) {
|
||||
if(!$u)
|
||||
$u=user_load($_SESSION['user_id']);
|
||||
|
||||
$u=user_load($_SESSION['users_id']);
|
||||
$_SESSION['roles']=array();
|
||||
if($u && is_array($u['roles'])) {
|
||||
foreach($u['roles'] AS $r=>$rd) {
|
||||
if($rd['active']=="yes")
|
||||
$_SESSION['roles'][]=$r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function user_conference_load($accounts_id,$conferences_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user