/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Auth/Storage
NameSizeModeActions
MemoryStorage.php16320644editdlrm
SessionStorage.php36700644editdlrm
StorageInterface.php14700644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Auth/Storage/SessionStorage.php (3670B)
'Auth.User', 'redirect' => 'Auth.redirect', ]; /** * Constructor. * * @param \Cake\Http\ServerRequest $request Request instance. * @param \Cake\Http\Response $response Response instance. * @param array $config Configuration list. */ public function __construct(ServerRequest $request, Response $response, array $config = []) { $this->_session = $request->getSession(); $this->setConfig($config); } /** * Read user record from session. * * @return \ArrayAccess|array|null User record if available else null. * @psalm-suppress InvalidReturnType */ public function read() { if ($this->_user !== null) { return $this->_user ?: null; } /** @psalm-suppress PossiblyInvalidPropertyAssignmentValue */ $this->_user = $this->_session->read($this->_config['key']) ?: false; /** @psalm-suppress InvalidReturnStatement */ return $this->_user ?: null; } /** * Write user record to session. * * The session id is also renewed to help mitigate issues with session replays. * * @param array|\ArrayAccess $user User record. * @return void */ public function write($user): void { $this->_user = $user; $this->_session->renew(); $this->_session->write($this->_config['key'], $user); } /** * Delete user record from session. * * The session id is also renewed to help mitigate issues with session replays. * * @return void */ public function delete(): void { $this->_user = false; $this->_session->delete($this->_config['key']); $this->_session->renew(); } /** * @inheritDoc */ public function redirectUrl($url = null) { if ($url === null) { return $this->_session->read($this->_config['redirect']); } if ($url === false) { $this->_session->delete($this->_config['redirect']); return null; } $this->_session->write($this->_config['redirect'], $url); } }