diff --git a/include/class.user.php b/include/class.user.php index f9e38f1feb599caa8a3ba426f91007d144e5c04c..ad54875fb0284b60f29b46f3d41c6ef68587dbe4 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -768,6 +768,8 @@ class UserAccount extends UserAccountModel { if ($vars['passwd1'] && !$vars['sendemail']) { $account->set('passwd', Password::hash($vars['passwd1'])); $account->setStatus(self::CONFIRMED); + if ($vars['pwreset-flag']) + $account->setStatus(self::PASSWD_RESET_REQUIRED); } $account->save(true); diff --git a/include/staff/templates/user-register.tmpl.php b/include/staff/templates/user-register.tmpl.php index 996636578c55bcbef0c5105c0f21d358b6ffc03a..8f87c41a3453add53001dc3d1bf62f2671a07bf4 100644 --- a/include/staff/templates/user-register.tmpl.php +++ b/include/staff/templates/user-register.tmpl.php @@ -47,7 +47,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div> <td> <input type="checkbox" id="sendemail" name="sendemail" value="1" <?php echo $info['sendemail'] ? 'checked="checked"' : ''; ?> > - Send account confirmation email to user. + Send account activation email to <?php echo $user->getEmail(); ?>. </td> </tr> <tr> @@ -82,6 +82,15 @@ $user->getName()->getOriginal(); ?></b>.</p></div> <span class="error"> <?php echo $errors['passwd2']; ?></span> </td> </tr> + <tr> + <td> + Password Change: + </td> + <td colspan=2> + <input type="checkbox" name="pwreset-flag" value="1" <?php + echo $info['pwreset-flag'] ? 'checked="checked"' : ''; ?>> Require password change on login + </td> + </tr> </tbody> <tbody> <tr>