Permalink
Browse files

login: Changing passwords now works when logged in as guest

  • Loading branch information...
1 parent 61e86f7 commit 78f6c5d5c043935a4c827f264a175878a871878b martinlanghoff committed May 18, 2006
Showing with 2 additions and 2 deletions.
  1. +1 −1 login/change_password.php
  2. +1 −1 login/change_password_form.html
@@ -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;
}
@@ -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)?>

0 comments on commit 78f6c5d

Please sign in to comment.