コード例 #1
0
 /**
  * Verify user after activation mail link opened
  * @param int $user_id user's id
  * @param string $user_activation_verification_code user's verification token
  */
 public function verify($user_id, $user_activation_verification_code)
 {
     if (isset($user_id) && isset($user_activation_verification_code)) {
         RegistrationModel::verifyNewUser($user_id, $user_activation_verification_code);
         $this->View->render('register/verify');
     } else {
         Redirect::to('login/index');
     }
 }
コード例 #2
0
 public function actionAccountSettings()
 {
     AdminModel::setAccountSuspensionAndDeletionStatus(Request::post('suspension'), Request::post('softDelete'), Request::post('user_id'));
     Redirect::to("admin");
 }
コード例 #3
0
 /**
  * This method controls what happens when you move to /note/delete(/XX) in your app.
  * Deletes a note. In a real application a deletion via GET/URL is not recommended, but for demo purposes it's
  * totally okay.
  * @param int $note_id id of the note
  */
 public function delete($note_id)
 {
     NoteModel::deleteNote($note_id);
     Redirect::to('note');
 }
コード例 #4
0
 /**
  * Password Change Action
  * Submit form, if retured positive redirect to index, otherwise show the changePassword page again
  */
 public function changePassword_action()
 {
     $result = PasswordResetModel::changePassword(Session::get('user_name'), Request::post('user_password_current'), Request::post('user_password_new'), Request::post('user_password_repeat'));
     if ($result) {
         Redirect::to('user/index');
     } else {
         Redirect::to('user/changePassword');
     }
 }
コード例 #5
0
 /**
  * Set the new password
  * Please note that this happens while the user is not logged in. The user identifies via the data provided by the
  * password reset link from the email, automatically filled into the <form> fields. See verifyPasswordReset()
  * for more. Then (regardless of result) route user to index page (user will get success/error via feedback message)
  * POST request !
  * TODO this is an _action
  */
 public function setNewPassword()
 {
     PasswordResetModel::setNewPassword(Request::post('user_name'), Request::post('user_password_reset_hash'), Request::post('user_password_new'), Request::post('user_password_repeat'));
     Redirect::to('login/index');
 }