后台用户管理
This commit is contained in:
@@ -23,6 +23,9 @@
|
|||||||
<th>
|
<th>
|
||||||
<span>手机号码</span>
|
<span>手机号码</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
<span>授权分组</span>
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<span>创建时间</span>
|
<span>创建时间</span>
|
||||||
</th>
|
</th>
|
||||||
@@ -46,6 +49,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span >{$item['mobile']}</span>
|
<span >{$item['mobile']}</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{$item['group_list']|implode=',',###}</td>
|
||||||
<td>{$item['reg_time']|date='Y-m-d',###}</td>
|
<td>{$item['reg_time']|date='Y-m-d',###}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{if condition="$item['status']"}
|
{if condition="$item['status']"}
|
||||||
|
|||||||
@@ -72,6 +72,11 @@ class User extends Base{
|
|||||||
return md5($value.$data['salt']);
|
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){
|
public function getInfo($uid){
|
||||||
$data = $this->where(array('uid'=>$uid))->find();
|
$data = $this->where(array('uid'=>$uid))->find();
|
||||||
if ($data) {
|
return $data;
|
||||||
return $data->toArray();
|
|
||||||
}else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user