/** * Verify user after activation mail link opened * @param string $ua_verification_code user's activation verification token */ public function getVerify($ua_verification_code) { $this->app->log->debug(get_class($this) . '->getVerify()'); $user_name = Encryption::decrypt($this->app->request->get("user_name")); if (isset($user_name) && isset($ua_verification_code)) { $success = RegistrationModel::verifyNewUser($user_name, $ua_verification_code); if ($success) { // TODO: valutare se inviare mail di benvenuto all'utente } $this->app->render($this->app->config('app.templates.path') . '/login/verify.twig', array('feedback_positive' => $this->getFeedbackPositiveMessages(), 'feedback_negative' => $this->getFeedbackNegativeMessages())); } else { $this->app->redirect($this->app->config('app.baseurl') . '/login'); } }
public static function deleteUser($user_email, $provider_type) { $b1 = true; $b2 = false; if ($provider_type) { $b1 = ExternalModel::rollbackRegistrationByEmail($provider_type); } $b2 = Registration::rollbackRegistrationByEmail($user_email); return $b1 && $b2; }