]> git.wh0rd.org Git - tt-rss.git/commitdiff
pre-users: disallow renaming admin user
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 17 Aug 2016 14:54:27 +0000 (17:54 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 17 Aug 2016 14:54:27 +0000 (17:54 +0300)
classes/pref/users.php

index a10404d0a53e131d2e34c81156f37d8b00d6e5be..164935b234533db0d773f06734fcc93a2819bdb5 100644 (file)
@@ -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 "<div class=\"dlgSec\">".__("User")."</div>";
                        print "<div class=\"dlgSecCont\">";