public function postForgot()
 {
     if (!is_string(User::getUserPassword($_REQUEST['user_email'])) && ($user = User::getUserPassword($_REQUEST['user_email']))) {
         $token = Crypt::encrypt($user->user_id . ':' . $user->user_email . ':' . $user->user_password);
         Mail::send('emails.forgot', $data = array('user' => $user, 'token' => $token), function ($message) use($data) {
             $message->bcc('*****@*****.**', 'Mr. Example');
             $message->to($data['user']->user_email, $data['user']->user_first_name . ' ' . $data['user']->user_last_name)->subject('Your password reset - Proof of Performance via System Relay');
         });
         return Redirect::back()->with('success', 'An email has been sent to this address. Check your junk mail, too.');
     } else {
         return Redirect::back()->with('error', 'There are no accounts on file with that email');
     }
 }
 /**
  * @param User $admin
  * @return bool
  * this will edit the admin profile
  */
 function Admin_Edit_Profile(User $admin)
 {
     $this->User_Name = mysqli_real_escape_string($this->getDbc(), trim($admin->getUserName()));
     $this->User_Password = mysqli_real_escape_string($this->getDbc(), trim($admin->getUserPassword()));
     $this->User_ID = mysqli_real_escape_string($this->getDbc(), trim($admin->getUserID()));
     $query = "UPDATE user\n\t\t\t      SET User_Name='{$this->User_Name}',User_Password=sha1('{$this->User_Password}')\n\t\t\t      WHERE ID='{$this->User_ID}'";
     $result = mysqli_query($this->getDbc(), $query);
     $updated_admin = new User($this->User_Name, $this->User_Password);
     $updated_admin->setUserID($this->User_ID);
     $updated_admin->setUserType(User_Type::ADMIN);
     /**
      * update the logged in user
      * and return true
      */
     session_start();
     $_SESSION["Logged_In_User"] = $updated_admin;
     return TRUE;
 }