public function setCurrentUser(\Gems_User_User $user)
    {
        if ($user !== self::$currentUser) {
            $this->unsetCurrentUser();
            self::$currentUser = $user;

            // Update the escort variable used by loader
            if ($escort = GemsEscort::getInstance()) {
                $escort->currentUser = $user;
            }

            // Double check in case this function was used as original
            // start for setting the user.
            if (! $user->isCurrentUser()) {
                $user->setAsCurrentUser(true);
            }
        }

        return $this;
    }
public function setCurrentUser(\Gems_User_User $user)
    {
        if ($user !== self::$currentUser) {
            $this->unsetCurrentUser();
            self::$currentUser = $user;

            // Update the escort variable used by loader
            if ($escort = GemsEscort::getInstance()) {
                $escort->currentUser = $user;
            }

            // Double check in case this function was used as original
            // start for setting the user.
            if (! $user->isCurrentUser()) {
                $user->setAsCurrentUser(true);
            }
        }

        return $this;
    }
public function setCurrentUser ( \ Gems_User_User $ user ) { if ( $ user !== self :: $ currentUser ) { $ this -> unsetCurrentUser ( ) ; self :: $ currentUser = $ user ; // Update the escort variable used by loader if ( $ escort = GemsEscort :: getInstance ( ) ) { $ escort -> currentUser = $ user ; } // Double check in case this function was used as original // start for setting the user. if ( ! $ user -> isCurrentUser ( ) ) { $ user -> setAsCurrentUser ( true ) ; } } return $ this ; }
Sets a new user as the current user.

@param \Gems_User_User $user
@return \Gems_User_UserLoader (continuation pattern)
Sets a new user as the current user .