protected function action() { \UsersRegistration_Registrate::testCaptcha($this->getParam('captcha')); $this->api = \Extasy\Users\Social\TwitterApiFactory::getInstance(); $userTwitterProfile = $this->api->getCurrentSession(); \UsersRegistration::signup($this->getParam('login'), \Extasy\Columns\Password::generatePassword(), $this->getParam('email'), ['social_networks' => ['twitter' => $userTwitterProfile['id']]]); return true; }
public function blockUser(\UserAccount $user) { \CMSLog::addMessage(self::LogName, sprintf('Users with login %s blocked ', $user->login->getValue())); $user->confirmation_code = \UsersRegistration::getConfirmationCode(); $user->update(); }