original_string: public function user(Model $Model, $result, $key = null) {
  		if (method_exists($Model, 'user')) {
  			return $Model->user($key, $result);
  		}
  
  		if (class_exists('AuthComponent')) {
  			return AuthComponent::user($key);
  		}
  
  		if (class_exists('Authsome')) {
  			return Authsome::get($key);
  		}
  
  		if (method_exists($Model, 'get')) {
  			$className = get_class($Model);
  			$ref = new ReflectionMethod($className, 'get');
  			if ($ref->isStatic()) {
  				return $className::get($key);
  			}
  		}
  
  		return false;
  	}
code: public function user(Model $Model, $result, $key = null) {
  		if (method_exists($Model, 'user')) {
  			return $Model->user($key, $result);
  		}
  
  		if (class_exists('AuthComponent')) {
  			return AuthComponent::user($key);
  		}
  
  		if (class_exists('Authsome')) {
  			return Authsome::get($key);
  		}
  
  		if (method_exists($Model, 'get')) {
  			$className = get_class($Model);
  			$ref = new ReflectionMethod($className, 'get');
  			if ($ref->isStatic()) {
  				return $className::get($key);
  			}
  		}
  
  		return false;
  	}
code_tokens: public function user ( Model $ Model , $ result , $ key = null ) { if ( method_exists ( $ Model , 'user' ) ) { return $ Model -> user ( $ key , $ result ) ; } if ( class_exists ( 'AuthComponent' ) ) { return AuthComponent :: user ( $ key ) ; } if ( class_exists ( 'Authsome' ) ) { return Authsome :: get ( $ key ) ; } if ( method_exists ( $ Model , 'get' ) ) { $ className = get_class ( $ Model ) ; $ ref = new ReflectionMethod ( $ className , 'get' ) ; if ( $ ref -> isStatic ( ) ) { return $ className :: get ( $ key ) ; } } return false ; }
docstring: Wrapper around retrieving user data
  
  Can be overriden in the Model to provide advanced control
  
  @param Model $Model Model to use to retrieve user
  @param array $result single Model record being authenticated against
  @param string $key field to retrieve.  Leave null to get entire User record
  @return mixed User record. or null if no user is logged in.
docstring_tokens: Wrapper around retrieving user data