'any', 'requestData' => [ 'email' => [ 'validation' => DataValidator::email(), 'error' => ERRORS::INVALID_EMAIL ] ] ]; } public function handler() { $userEmail = Controller::request('email'); $user = User::getDataStore($userEmail, 'email'); if (!$user->verificationToken || !$user->email) { throw new RequestException(ERRORS::NO_PERMISSION); } if(MailSender::getInstance()->isConnected()) { $this->resendTokenMail($user); } Response::respondSuccess(); } public function resendTokenMail($user) { $mailSender = MailSender::getInstance(); $mailSender->setTemplate(MailTemplate::USER_SIGNUP, [ 'to' => $user->email, 'name' => $user->name, 'url' => Setting::getSetting('url')->getValue(), 'verificationToken' => $user->verificationToken ]); $mailSender->send(); } }