mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 04:28:17 +01:00
disable first user delete
This commit is contained in:
parent
4255076c44
commit
c10f2f4914
@ -269,10 +269,11 @@ class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interfac
|
||||
public function deleteUser()
|
||||
{
|
||||
$users = $this->request->filter('int')->getArray('uid');
|
||||
$masterUserId = $this->db->fetchObject($this->db->select(array('MIN(uid)' => 'num'))->from('table.users'))->num;
|
||||
$deleteCount = 0;
|
||||
|
||||
foreach ($users as $user) {
|
||||
if (1 == $user || $user == $this->user->id) {
|
||||
if ($masterUserId == $user || $user == $this->user->id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user