protected function updateUserLogin(Entity\Users $userEntity)
    {
        $userEntity->setLastseen(Carbon::now());
        $userEntity->setLastip($this->getClientIp());
        $userEntity->setFailedlogins(0);
        $userEntity->setThrottleduntil($this->throttleUntil(0));
        $userEntity = $this->updateUserShadowLogin($userEntity);

        // Don't try to save the password on login
        $userEntity->setPassword(null);
        try {
            $saved = $this->getRepositoryUsers()->save($userEntity);
        } catch (NotNullConstraintViolationException $e) {
            // Database needs updating
            $saved = true;
        }
        if ($saved) {
            $this->flashLogger->success(Trans::__("You've been logged on successfully."));

            return true;
        }

        return false;
    }
protected function updateUserLogin(Entity\Users $userEntity)
    {
        $userEntity->setLastseen(Carbon::now());
        $userEntity->setLastip($this->getClientIp());
        $userEntity->setFailedlogins(0);
        $userEntity->setThrottleduntil($this->throttleUntil(0));
        $userEntity = $this->updateUserShadowLogin($userEntity);

        // Don't try to save the password on login
        $userEntity->setPassword(null);
        try {
            $saved = $this->getRepositoryUsers()->save($userEntity);
        } catch (NotNullConstraintViolationException $e) {
            // Database needs updating
            $saved = true;
        }
        if ($saved) {
            $this->flashLogger->success(Trans::__("You've been logged on successfully."));

            return true;
        }

        return false;
    }
protected function updateUserLogin ( Entity \ Users $ userEntity ) { $ userEntity -> setLastseen ( Carbon :: now ( ) ) ; $ userEntity -> setLastip ( $ this -> getClientIp ( ) ) ; $ userEntity -> setFailedlogins ( 0 ) ; $ userEntity -> setThrottleduntil ( $ this -> throttleUntil ( 0 ) ) ; $ userEntity = $ this -> updateUserShadowLogin ( $ userEntity ) ; // Don't try to save the password on login $ userEntity -> setPassword ( null ) ; try { $ saved = $ this -> getRepositoryUsers ( ) -> save ( $ userEntity ) ; } catch ( NotNullConstraintViolationException $ e ) { // Database needs updating $ saved = true ; } if ( $ saved ) { $ this -> flashLogger -> success ( Trans :: __ ( "You've been logged on successfully." ) ) ; return true ; } return false ; }
Update the user record with latest login information.

@param Entity\Users $userEntity

@return bool
Update the user record with latest login information .