Пример #1
0
 protected function factoryColumn($userLogin)
 {
     $user = \UserAccount::getByLogin($userLogin);
     $this->column = new SocialNetworks('testName', [], null);
     $this->column->setDocument($user);
     return $this->column;
 }
Пример #2
0
 protected function action()
 {
     try {
         UsersLogin::testLoginAttempts();
     } catch (\Exception $e) {
         Record::add(__CLASS__, $e->getMessage(), $e);
         throw $e;
     }
     //
     $this->api = \Extasy\Users\Social\OdnoklassnikiApiFactory::getInstance();
     $userOdnoklassnikiProfile = $this->api->getCurrentSession();
     $uid = $userOdnoklassnikiProfile['id'];
     $user = \Extasy\Users\Columns\SocialNetworks::getByUID($uid, 'odnoklassniki');
     UsersLogin::testConfirmationCode($user);
     UsersLogin::forceLogin($user);
     $log = sprintf('Odnoklassniki login successfully finished. User ("%s", "%d") logged with uid ("%s" )', $user->login->getValue(), $user->id->getValue(), $userOdnoklassnikiProfile['id']);
     Record::add(__CLASS__, $log);
 }