Example #1
0
 /**
  * @return mixed
  */
 public function getVarString()
 {
     if (isset($this->VarString)) {
         return $this->VarString;
     } else {
         include_once $_SERVER['DOCUMENT_ROOT'] . "/bossflex/DB/Models/Auth.php";
         return Auth::getRandomString(5);
     }
 }
                    Auth::changePassword($User, $pass1);
                    echo "<h3>Password Changed</h3>";
                    $User->regenVarString();
                    //Invalidate the original link
                    session_destroy();
                    exit;
                }
            } else {
                echo "<h3>Passwords do not match</h3>";
            }
        } else {
            echo "<h3>Invalid Form Submission. Please try again.</h3>";
        }
    }
}
$_SESSION['unique'] = Auth::getRandomString(5);
if (!$validUser) {
    echo "<h3>The page you are trying to reach is no longer valid</h3>";
    exit;
}
?>

<html>
<body>
    <form action="ChangePassword.php" method="post">
        <p>Password <br> <input type="password" name="Password1"></p>
        <p>Confirm Password <br> <input type="password" name="Password2"></p>
        <input type="hidden" name="unique" value="<?php 
echo $_SESSION['unique'];
?>
">