<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lekoala / silverstripe-multi-devices-remember-me example snippets
public function logIn($remember = false) {
...
// Only set the cookie if autologin is enabled
RememberMeExtension::setDeviceCookie($this, $remember);
// if($remember && Security::config()->autologin_enabled) {
// // Store the hash and give the client the cookie with the token.
// $generator = new RandomGenerator();
// $token = $generator->randomToken('sha1');
// $hash = $this->encryptWithUserSettings($token);
// $this->RememberLoginToken = $hash;
// Cookie::set('alc_enc', $this->ID . ':' . $token, 90, null, null, null, true);
// } else {
// $this->RememberLoginToken = null;
// Cookie::force_expiry('alc_enc');
// }
...