ProfileUserinfoAction.class.php (1010B)
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 }