Psecio\Gatekeeper\Gatekeeper::rememberMe PHP Method

rememberMe() public static method

Enable and set up the "Remember Me" cookie token handling for the given user
public static rememberMe ( Psecio\Gatekeeper\UserModel | string $user, array $config = [] ) : boolean
$user Psecio\Gatekeeper\UserModel | string User model instance
$config array Set of configuration settings
return boolean Success/fail of sesssion setup
    public static function rememberMe($user, array $config = array())
    {
        if (is_string($user)) {
            $user = Gatekeeper::findUserByUsername($user);
        }
        $data = array_merge($_COOKIE, $config);
        $remember = new Session\RememberMe(self::$datasource, $data, $user);
        return $remember->setup();
    }