Skip to content

Commit

Permalink
oops: Fix inability to edit agents with only one admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Hancock committed Jan 7, 2015
1 parent f368efa commit 932bd88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/class.staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ function save($id, $vars, &$errors) {
.' WHERE isadmin=1 and isactive=1';
if (($res = db_query($sql))
&& (list($count, $sid) = db_fetch_row($res))) {
if ($count == 1 && $sid = $id) {
if ($count == 1 && $sid == $id) {
$errors['isadmin'] =
'Cowardly refusing to remove or lock out the only active administrator';
}
Expand Down

0 comments on commit 932bd88

Please sign in to comment.