Permalink
Browse files

Allow the primary admin to edit their own account even when external

authentication is being used.
  • Loading branch information...
1 parent ccf28b7 commit f03af7f3c1900e0247f574bb12d540ddf4b1e990 moodler committed Sep 9, 2003
Showing with 4 additions and 2 deletions.
  1. +4 −2 user/edit.html
View
@@ -12,9 +12,11 @@
<table cellpadding=9 cellspacing=0 >
<?php
if (isadmin()) {
+ $theadmin = get_admin();
+ $adminself = ($theadmin->id == $USER->id);
echo "<tr valign=top>";
echo "<td><p>".get_string("username").":</td>";
- if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+ if ($adminself || $CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
echo "<td><input type=\"text\" name=\"username\" size=20 value=\"";
p($user->username);
echo "\">";
@@ -29,7 +31,7 @@
echo "</td>";
echo "</tr>";
- if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+ if ($adminself || $CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
echo "<tr valign=top>";
echo "<td><p>".get_string("newpassword").":</td>";
echo "<td><input type=\"text\" name=\"newpassword\" size=20 value=\"";

0 comments on commit f03af7f

Please sign in to comment.