/** * Return an array of information about user-selectable themes. Each entry in * the array is an associative array with 'name', 'desc' and 'selected' keys. * * @return array */ protected function getThemeOptions() { $options = []; if (isset($this->config->selectable_themes)) { $parts = explode(',', $this->config->selectable_themes); foreach ($parts as $part) { $subparts = explode(':', $part); $name = trim($subparts[0]); $desc = isset($subparts[1]) ? trim($subparts[1]) : ''; $desc = empty($desc) ? $name : $desc; if (!empty($name)) { $options[] = ['name' => $name, 'desc' => $desc, 'selected' => $this->cookieManager->get('ui') == $name]; } } } return $options; }
/** * Updates the user information in the session. * * @param UserRow $user User object to store in the session * * @return void */ public function updateSession($user) { $this->currentUser = $user; $this->session->userId = $user->id; $this->cookieManager->clear('loggedOut'); }
/** * Updates the user information in the session. * * @param UserRow $user User object to store in the session * * @return void */ public function updateSession($user) { $this->currentUser = $user; if ($this->inPrivacyMode()) { $this->session->userDetails = $user->toArray(); } else { $this->session->userId = $user->id; } $this->cookieManager->clear('loggedOut'); }
/** * Get cookie domain context (null if unset). * * @return string */ public function getCookieDomain() { return $this->cookieManager->getDomain(); }