Ejemplo n.º 1
0
function send_mail($user)
{
    $token = set_token($user, reset_token());
    $message = "Reset Your Password  <br>";
    $message .= "gu-blade-spare1.compsci.gannon.edu/";
    $message .= "SRMS/reset_password.php?token=" . $token . "&user="******"&usertype=" . $user[0]['user_type'];
    $to = $user[0]['username'] . "@knights.gannon.edu";
    include 'gmail.php';
    //echo $message;
    //	mail($to,$subject,$message,$headers);
}
Ejemplo n.º 2
0
 public function create_reset_token()
 {
     //    self::find_by_username($username);
     $token = reset_token();
     if (isset($this->id)) {
         $this->reset_token = $token;
         $this->update_no_password();
         return true;
     } else {
         return false;
     }
 }