提交 75011b2d authored 作者: chengye's avatar chengye

修复管理角色账号权限

上级 fc3f050a
...@@ -319,6 +319,8 @@ class loginClassModel extends Model ...@@ -319,6 +319,8 @@ class loginClassModel extends Model
public function setsession($uid, $name,$token, $user='') public function setsession($uid, $name,$token, $user='')
{ {
$encryptKey = $this->getRandomStr(); $encryptKey = $this->getRandomStr();
$isadmin = (int)$this->getsession('isadmin');
$session = array( $session = array(
'adminid' => $uid, 'adminid' => $uid,
'adminname' => $name, 'adminname' => $name,
...@@ -327,7 +329,7 @@ class loginClassModel extends Model ...@@ -327,7 +329,7 @@ class loginClassModel extends Model
'logintime' => time(), 'logintime' => time(),
'ukey' => $encryptKey 'ukey' => $encryptKey
); );
if($user == 'admin') $session['is_admin'] = true; if($user == 'admin' || $isadmin) $session['is_admin'] = true;
else $session['is_admin'] = false; else $session['is_admin'] = false;
$this->rock->savesession($session); $this->rock->savesession($session);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论