File modules/cms/action/profile/ProfileUserinfoAction.class.php

Last commit: Sat Oct 17 02:16:28 2026 +0200	Jan Dankert	Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths.
1 <?php 2 namespace cms\action\profile; 3 use cms\action\Method; 4 use cms\action\ProfileAction; 5 use cms\base\Configuration; 6 use cms\model\User; 7 use cms\ui\themes\ThemeStyle; 8 use util\Session; 9 use util\UIUtils; 10 11 class ProfileUserinfoAction extends ProfileAction implements Method { 12 13 14 /** 15 * Gets user information. 16 * If no user is logged in, default information will be returned. 17 * 18 * @return void 19 */ 20 public function view() { 21 22 $user = $this->currentUser; 23 24 $this->setTemplateVar('authenticated',$user != null ); 25 $this->setTemplateVar('name' ,$user != null ? $user->getName() : '' ); 26 $this->setTemplateVar('letter' ,$user != null ? strtoupper( @$user->getName()[0]) : '' ); 27 28 // Style scheme from user or 1 (=automatic) 29 $this->setTemplateVar('styleScheme' ,$user != null ? $user->styleScheme : User::STYLE_SCHEME_AUTO ); 30 31 $currentStyle = $this->getUserStyle($user); 32 $this->setTemplateVar('style',$currentStyle); 33 34 35 //$themeStyle = new ThemeStyle( Configuration::subset('style')->get($currentStyle,[]) ); // user style config 36 37 // Theme base color for smartphones colorizing their status bar. 38 //$this->setTemplateVar('theme-color', $themeStyle->getThemeColor()); 39 40 // Output all theme colors 41 //$this->setTemplateVar('theme' , $themeStyle->getProperties() ); 42 } 43 44 45 46 47 48 public function checkAccess() { 49 return true; 50 } 51 }
Download modules/cms/action/profile/ProfileUserinfoAction.class.php
History Sat, 17 Oct 2026 02:16:28 +0200 Jan Dankert Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths. Tue, 13 Oct 2026 00:22:21 +0200 Jan Dankert Refactoring: Fixing the flickering UI: Create CSS with dark/light-schemes, so the browser can decide which to use. Thu, 26 Dec 2024 19:46:52 +0100 Jan Dankert Fix: IndexThemestyleAction is creating the theme properties. So this code can be deleted. Sat, 7 Dec 2024 20:34:52 +0100 Jan Dankert UI: New Selection for user color scheme. Wed, 30 Oct 2024 22:17:22 +0100 Jan Dankert UI-Refactoring: The navigation is now able to open its own dialog. Fri, 15 Apr 2022 14:51:22 +0200 dankert Refactoring: User,Config and Database info is now stored in the Request, because so there is no session required for clients which are using Basic Authorization. Tue, 22 Feb 2022 21:37:08 +0100 dankert Fix: Displaying the QRCode was broken. Now the QR code is styled with CSS :) Fri, 3 Dec 2021 23:27:44 +0100 dankert New: Only allowed methods are shown in the dropdown menu; Some security enhancements. Mon, 29 Mar 2021 02:40:31 +0200 Jan Dankert Fix: Some profile actions were not readable with a guest user. Wed, 10 Feb 2021 22:04:26 +0100 Jan Dankert Provide the theme configuration through a class. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.