src/ULogin/Init.php
public function getUser()
    {

        // destroy previous content
        $this->destroyUserData();

        if ($this->user === false) {

            // get user

            $url = 'http://ulogin.ru/token.php?token=' . $this->getToken() . '&host=' . (new Request())->getHttpHost();
            $content = file_get_contents($url);
            $this->user = json_decode($content, true);

            // if use has error , destroy user data
            if ($this->destroyUserData() === true) {
                $this->logout();
            }
        }

        return $this->user;
    }
public function getUser()
    {

        // destroy previous content
        $this->destroyUserData();

        if ($this->user === false) {

            // get user

            $url = 'http://ulogin.ru/token.php?token=' . $this->getToken() . '&host=' . (new Request())->getHttpHost();
            $content = file_get_contents($url);
            $this->user = json_decode($content, true);

            // if use has error , destroy user data
            if ($this->destroyUserData() === true) {
                $this->logout();
            }
        }

        return $this->user;
    }
public function getUser ( ) { // destroy previous content $ this -> destroyUserData ( ) ; if ( $ this -> user === false ) { // get user $ url = 'http://ulogin.ru/token.php?token=' . $ this -> getToken ( ) . '&host=' . ( new Request ( ) ) -> getHttpHost ( ) ; $ content = file_get_contents ( $ url ) ; $ this -> user = json_decode ( $ content , true ) ; // if use has error , destroy user data if ( $ this -> destroyUserData ( ) === true ) { $ this -> logout ( ) ; } } return $ this -> user ; }
Returns an associative array with the data about the user.
Fields array described in the method setFields

@example <code>
$this->getUser();
</code>

@return array|bool|mixed data provided by the ISP login
Returns an associative array with the data about the user . Fields array described in the method setFields