protected function factoryColumn($userLogin) { $user = \UserAccount::getByLogin($userLogin); $this->column = new SocialNetworks('testName', [], null); $this->column->setDocument($user); return $this->column; }
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); }