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

Last commit: Fri Apr 15 14:51:22 2022 +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.
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\ui\themes\ThemeStyle; 7 use util\Session; 8 use util\UIUtils; 9 10 class ProfileUserinfoAction extends ProfileAction implements Method { 11 12 13 /** 14 * Gets user information. 15 * If no user is logged in, default information will be returned. 16 * 17 * @return void 18 */ 19 public function view() { 20 21 $user = $this->currentUser; 22 23 $currentStyle = $this->getUserStyle($user); 24 $this->setTemplateVar('style',$currentStyle); 25 26 27 $themeStyle = new ThemeStyle( Configuration::subset('style')->get($currentStyle,[]) ); // user style config 28 29 // Theme base color for smartphones colorizing their status bar. 30 $this->setTemplateVar('theme-color', UIUtils::getColorHexCode($themeStyle->getThemeColor())); 31 32 // Output all theme colors 33 $this->setTemplateVar('theme' , $themeStyle->getProperties() ); 34 } 35 36 37 public function post() { 38 } 39 40 41 public function checkAccess() { 42 return true; 43 } 44 }
Download modules/cms/action/profile/ProfileUserinfoAction.class.php
History 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.