更新用户模块
This commit is contained in:
@@ -82,12 +82,20 @@ class User extends Base {
|
||||
* @title 删除用户
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function del($id) {
|
||||
$uid = array('IN', is_array($id) ? implode(',', $id) : $id);
|
||||
public function del() {
|
||||
$uid = $this->request->param('id');
|
||||
|
||||
if ($this->request->rootUid == $uid) {
|
||||
return $this->error('超级用户无法删除!');
|
||||
}
|
||||
|
||||
//获取用户信息
|
||||
$find = $this->getUserinfo($uid);
|
||||
model('Member')->where(array('uid' => $uid))->delete();
|
||||
return $this->success('删除用户成功!');
|
||||
$result = Member::where('uid', $uid)->delete();
|
||||
if (false !== $result) {
|
||||
return $this->success('删除用户成功!');
|
||||
}else{
|
||||
return $this->error('删除失败!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user