后台用户管理

This commit is contained in:
2016-12-02 10:12:43 +08:00
parent 3d9cbcfa22
commit e2910d287a
2 changed files with 10 additions and 5 deletions

View File

@@ -72,6 +72,11 @@ class User extends Base{
return md5($value.$data['salt']);
}
protected function getGroupListAttr($value, $data){
$sql = db('AuthGroupAccess')->where('uid', $data['uid'])->fetchSql(true)->column('group_id');
return db('AuthGroup')->where('id in ('.$sql.')')->column('title', 'id');
}
/**
* 用户登录模型
*/
@@ -175,11 +180,7 @@ class User extends Base{
public function getInfo($uid){
$data = $this->where(array('uid'=>$uid))->find();
if ($data) {
return $data->toArray();
}else{
return false;
}
return $data;
}
/**