后台用户管理
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
<th>
|
||||
<span>手机号码</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>授权分组</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>创建时间</span>
|
||||
</th>
|
||||
@@ -46,6 +49,7 @@
|
||||
<td>
|
||||
<span >{$item['mobile']}</span>
|
||||
</td>
|
||||
<td>{$item['group_list']|implode=',',###}</td>
|
||||
<td>{$item['reg_time']|date='Y-m-d',###}</td>
|
||||
<td class="text-center">
|
||||
{if condition="$item['status']"}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user