Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
nganhtuan63 committed Aug 3, 2012
1 parent fa488b0 commit 4fb5477
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions core/cms1.0/models/user/User.php
Expand Up @@ -252,15 +252,19 @@ protected function afterDelete()
*/
public static function getStringRoles($uid=0)
{
$roles=Rights::getAssignedRoles($uid,true);
$res=array();
foreach($roles as $r){
$res[]=$r->name;
}
if(count($res)>0)
return implode(",",$res);
else
return '';
if($uid){
$roles=Rights::getAssignedRoles($uid,true);
$res=array();
foreach($roles as $r){
$res[]=$r->name;
}
if(count($res)>0)
return implode(",",$res);
else
return '';

}
return '';

}

Expand Down

0 comments on commit 4fb5477

Please sign in to comment.