From a84fb943b4c5a030e215fa819e579ca4646cf617 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Aug 2016 17:54:27 +0300 Subject: [PATCH] pre-users: disallow renaming admin user --- classes/pref/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/pref/users.php b/classes/pref/users.php index a10404d0..164935b2 100644 --- a/classes/pref/users.php +++ b/classes/pref/users.php @@ -37,7 +37,7 @@ class Pref_Users extends Handler_Protected { $access_level = $this->dbh->fetch_result($result, 0, "access_level"); $email = $this->dbh->fetch_result($result, 0, "email"); - $sel_disabled = ($id == $_SESSION["uid"]) ? "disabled" : ""; + $sel_disabled = ($id == $_SESSION["uid"] || $login == "admin") ? "disabled" : ""; print "
".__("User")."
"; print "
"; -- 2.39.5