Example #1
0
 protected function action()
 {
     \UsersRegistration_Registrate::testCaptcha($this->getParam('captcha'));
     $this->api = \Extasy\Users\Social\VkontakteApiFactory::getInstance();
     $userVkontakteProfile = $this->api->getCurrentSession();
     \UsersRegistration::signup($this->getParam('login'), \Extasy\Columns\Password::generatePassword(), $this->getParam('email'), ['social_networks' => ['vkontakte' => $userVkontakteProfile['id']]]);
     return true;
 }
Example #2
0
 protected function action()
 {
     try {
         UsersLogin::testLoginAttempts();
     } catch (\Exception $e) {
         Record::add(__CLASS__, $e->getMessage(), $e);
         throw $e;
     }
     //
     $this->api = \Extasy\Users\Social\VkontakteApiFactory::getInstance();
     $userVkontakteProfile = $this->api->getCurrentSession();
     $uid = $userVkontakteProfile['id'];
     $user = \Extasy\Users\Columns\SocialNetworks::getByUID($uid, 'vkontakte');
     UsersLogin::testConfirmationCode($user);
     UsersLogin::forceLogin($user);
     $log = sprintf('Vkontakte login successfully finished. User ("%s", "%d") logged with uid ("%s" )', $user->login->getValue(), $user->id->getValue(), $userVkontakteProfile['id']);
     Record::add(__CLASS__, $log);
 }
Example #3
0
 protected function action()
 {
     $vkontakteApi = \Extasy\Users\Social\VkontakteApiFactory::getInstance();
     return $vkontakteApi->getCurrentSession();
 }