Skip to content
Snippets Groups Projects
Commit ecb4f898 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix inability to edit agents with only one admin

parent beea3b4b
Branches
Tags v1.9.5
No related merge requests found
...@@ -780,7 +780,7 @@ class Staff extends AuthenticatedUser { ...@@ -780,7 +780,7 @@ class Staff extends AuthenticatedUser {
.' WHERE isadmin=1 and isactive=1'; .' WHERE isadmin=1 and isactive=1';
if (($res = db_query($sql)) if (($res = db_query($sql))
&& (list($count, $sid) = db_fetch_row($res))) { && (list($count, $sid) = db_fetch_row($res))) {
if ($count == 1 && $sid = $id) { if ($count == 1 && $sid == $id) {
$errors['isadmin'] = __( $errors['isadmin'] = __(
'Cowardly refusing to remove or lock out the only active administrator' 'Cowardly refusing to remove or lock out the only active administrator'
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment