login: Changing passwords now works when logged in as guest

This commit is contained in:
martinlanghoff
2006-05-18 00:53:57 +00:00
parent c0e2f1f7dd
commit 42101fae2c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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)?>