login: Changing passwords now works when logged in as guest
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
// We NEED to set this, because the form assumes it has a value!
|
||||
$frm->id = empty($course->id) ? 0 : $course->id;
|
||||
|
||||
if (empty($frm->username)) {
|
||||
if (empty($frm->username) && !isguest()) {
|
||||
$frm->username = $USER->username;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<tr valign="top">
|
||||
<td><?php print_string("username") ?>:</td>
|
||||
<td>
|
||||
<?php if (isadmin()) { ?>
|
||||
<?php if (isadmin() || empty($frm->username)) { ?>
|
||||
<input type="text" name="username" size="25" value="<?php p($frm->username) ?>" alt="<?php print_string("username") ?>" />
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="username" value="<?php p($frm->username)?>" /> <?php p($frm->username)?>
|
||||
|
||||
Reference in New Issue
Block a user