Skip to content

Commit

Permalink
Merge pull request #611 from greezybacon/issue/forgot-my-password
Browse files Browse the repository at this point in the history
oops: Fix display of forgot-my-password link

Reviewed-By: Peter Rotich <peter@osticket.com>
  • Loading branch information
protich committed Feb 26, 2014
2 parents b6df489 + 5900770 commit 2f8a48f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/staff/login.tpl.php
Expand Up @@ -12,7 +12,7 @@
<input type="text" name="userid" id="name" value="<?php echo $info['userid']; ?>" placeholder="username" autocorrect="off" autocapitalize="off">
<input type="password" name="passwd" id="pass" placeholder="password" autocorrect="off" autocapitalize="off">
</fieldset>
<?php if ($_SESSION['_staff']['strikes'] > 1 && $cfg->allowPasswordReset()) { ?>
<?php if ($show_reset && $cfg->allowPasswordReset()) { ?>
<h3 style="display:inline"><a href="pwreset.php">Forgot my password</a></h3>
<?php } ?>
<input class="submit" type="submit" name="submit" value="Log In">
Expand Down
2 changes: 2 additions & 0 deletions scp/login.php
Expand Up @@ -23,6 +23,7 @@
$msg = $_SESSION['_staff']['auth']['msg'];
$msg = $msg?$msg:'Authentication Required';
$dest=($dest && (!strstr($dest,'login.php') && !strstr($dest,'ajax.php')))?$dest:'index.php';
$show_reset = false;
if($_POST) {
// Lookup support backends for this staff
$username = trim($_POST['userid']);
Expand All @@ -34,6 +35,7 @@
}

$msg = $errors['err']?$errors['err']:'Invalid login';
$show_reset = true;
}
// Consider single sign-on authentication backends
else if (!$thisstaff || !($thisstaff->getId() || $thisstaff->isValid())) {
Expand Down

0 comments on commit 2f8a48f

Please sign in to comment.