public function login(string $login, string $password)
    {
        $user = $this->auth_repository->login($login, $password);

        if (null === $user) {
            return null;
        }

        if ($this->container->has('user')) {
            unset($this->container['user']);
        }
        $this->container['user'] = $user;

        return $this->auth_storage->setUser($user);
    }
public function login(string $login, string $password)
    {
        $user = $this->auth_repository->login($login, $password);

        if (null === $user) {
            return null;
        }

        if ($this->container->has('user')) {
            unset($this->container['user']);
        }
        $this->container['user'] = $user;

        return $this->auth_storage->setUser($user);
    }
public function login ( string $ login , string $ password ) { $ user = $ this -> auth_repository -> login ( $ login , $ password ) ; if ( null === $ user ) { return null ; } if ( $ this -> container -> has ( 'user' ) ) { unset ( $ this -> container [ 'user' ] ) ; } $ this -> container [ 'user' ] = $ user ; return $ this -> auth_storage -> setUser ( $ user ) ; }
Log in user.

Return result, based by selected session storage

@param string $login
@param string $password

@return mixed
Log in user .