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

oops: Fix inability to edit agents with only one admin

parent 2f48c682
Branches
Tags
No related merge requests found
...@@ -780,7 +780,7 @@ implements AuthenticatedUser { ...@@ -780,7 +780,7 @@ implements 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 == $uid) {
$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