public function forceLogin(Model $user = null)
    {
        // The model parameter must be optional to comply with PHP Strict Mode method override rules and as the model
        // is actually required, this ensures that it is provided
        if ($user === null) {
            throw new ImplementationException('A model is required to force login');
        }

        $this->loggedInUserIdentifier = $user->UniqueIdentifier;

        parent::forceLogin();
    }
public function forceLogin(Model $user = null)
    {
        // The model parameter must be optional to comply with PHP Strict Mode method override rules and as the model
        // is actually required, this ensures that it is provided
        if ($user === null) {
            throw new ImplementationException('A model is required to force login');
        }

        $this->loggedInUserIdentifier = $user->UniqueIdentifier;

        parent::forceLogin();
    }
public function forceLogin ( Model $ user = null ) { // The model parameter must be optional to comply with PHP Strict Mode method override rules and as the model // is actually required, this ensures that it is provided if ( $ user === null ) { throw new ImplementationException ( 'A model is required to force login' ) ; } $ this -> loggedInUserIdentifier = $ user -> UniqueIdentifier ; parent :: forceLogin ( ) ; }
Provides a way to set the logged in user based on having the user's model.

This is used by things like Api Authentication and makes sure that the means by which permissions are
determined is exactly the same as for any other part of the solution.

@param  Model $user Required
@throws ImplementationException
Provides a way to set the logged in user based on having the user s model .