File modules/template_engine/components/html/component_user/component-user.php
Last commit: Wed Nov 11 20:52:26 2020 +0100 Jan Dankert Fix: Advanced view for folder was broken.
1 <?php 2 3 use cms\base\Configuration as C; 4 use cms\base\Language; 5 use language\Messages; 6 7 function component_user($user ) 8 { 9 extract( $user ); 10 11 if ( empty($fullname) ) 12 $fullname = Language::lang( Messages::UNKNOWN ); 13 14 $showName = C::subset(['security','user'])->is('show_username',false ); 15 16 if ( $showName ) { 17 if ( empty($name) ) 18 $name = Language::lang(Messages::UNKNOWN ); 19 } 20 else 21 $name = $fullname; 22 23 24 $showMail = isset($mail) && $mail && C::subset(['security','user'])->is('show_mail',false ); 25 26 if ( $showMail ) 27 echo "<a href=\"mailto:$mail\" title=\"$fullname\">"; 28 29 echo "<span class=\"or-username\" title=\"$fullname\">$name</span>"; 30 31 if ( $showMail ) 32 echo "</a>"; 33 34 }
Downloadmodules/template_engine/components/html/component_user/component-user.php
History Wed, 11 Nov 2020 20:52:26 +0100 Jan Dankert Fix: Advanced view for folder was broken. Sun, 1 Nov 2020 00:36:50 +0100 Jan Dankert Refactoring: Only using the configuration object. Wed, 14 Oct 2020 22:20:22 +0200 Jan Dankert Refactoring: Renamed component folders, because 'if' is no valid namespace fragment.