require_once 'plc_session.php';
global $plc, $api, $adm;
-// Print header
-require_once 'plc_drupal.php';
-include 'plc_header.php';
-
// Only display dialogs if the user is not logged in.
if ( !$plc->person) {
+ // Print header
+ require_once 'plc_drupal.php';
+ include 'plc_header.php';
if (!empty($_REQUEST['id']) && !empty($_REQUEST['key'])) {
$person_id = intval($_REQUEST['id']);
if ($adm->ResetPassword($person_id, $_REQUEST['key']) != 1) {
print '<div class="messages error">' . $adm->error() . '.</div>';
} else {
- drupal_set_html_head("<meta http-equiv=\"refresh\" content=\"60; URL=/\"");
-
print '<div class="messages status">';
print "Success! We've sent you another e-mail with your new temporary password. <br/>";
print "You can login using this temporaray password. <br/>";
EOF;
}
+ include 'plc_footer.php';
+
+} else {
+ // Otherwise display the user's account page.
+ Header("Location: /db/persons/index.php?id=" . $plc->person['person_id']);
+ exit();
}
-include 'plc_footer.php';
?>