Skip to content

Commit

Permalink
login: Changing passwords now works when logged in as guest
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlanghoff committed May 18, 2006
1 parent 61e86f7 commit 78f6c5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion login/change_password.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,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;
}

Expand Down
2 changes: 1 addition & 1 deletion login/change_password_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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)?>
Expand Down

0 comments on commit 78f6c5d

Please sign in to comment.