# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- modules/mod_cblogin/mod_cblogin.php +++ modules/mod_cblogin/mod_cblogin.php @@ -143,6 +143,8 @@ } if ( $_CB_framework->myId() ) { + $cbUser =& CBuser::getInstance( $_CB_framework->myId() ); + if ($name) { if ($name == 2) { $query = "SELECT firstname FROM #__comprofiler WHERE id = ". (int) $_CB_framework->myId(); @@ -166,9 +168,9 @@ // Add Authenticated Pre text if ( $logoutpretext ) { if ( defined( $logoutpretext ) ) { - echo constant( $logoutpretext ); + echo $cbUser->replaceUserVars(constant( $logoutpretext )); } else { - echo $logoutpretext; + echo $cbUser->replaceUserVars($logoutpretext); } echo "\n"; } @@ -176,12 +178,11 @@ $avatarDisplayed = false; if ($show_avatar == 0) { - if ($greeting) echo ''.sprintf( _UE_HI_NAME, $name ).''.($horizontal ? " " : ""); + if ($greeting) echo ''.$cbUser->replaceUserVars(sprintf( _UE_HI_NAME, $name )).''.($horizontal ? " " : ""); } else { - if (($avatar_position=="default") and ($greeting)) echo ''.sprintf( _UE_HI_NAME, $name ).''; + if (($avatar_position=="default") and ($greeting)) echo ''.$cbUser->replaceUserVars(sprintf( _UE_HI_NAME, $name )).''; - $cbUser =& CBuser::getInstance( $_CB_framework->myId() ); $oValue = $cbUser->avatarFilePath( $show_avatar ); if ($oValue) { if ($avatar_position=="default") echo '
'; @@ -259,10 +260,10 @@ if ($avatarDisplayed && ( ! $horizontal ) ) { echo $preDiv . '" id="mod_login_greeting'.$id_sfx.'">'; echo '
'; - echo sprintf( _UE_HI_NAME, '
'.$name ); + echo $cbUser->replaceUserVars(sprintf( _UE_HI_NAME, '
'.$name )); echo $postDiv; } else { - echo ''.sprintf( _UE_HI_NAME, $name ).''; + echo ''.$cbUser->replaceUserVars(sprintf( _UE_HI_NAME, $name )).''; } } @@ -500,9 +501,9 @@ // Add Authenticated Post text if ( $logoutposttext ) { if ( defined( $logoutposttext ) ) { - echo constant( $logoutposttext ); + echo $cbUser->replaceUserVars(constant( $logoutposttext )); } else { - echo $logoutposttext; + echo $cbUser->replaceUserVars($logoutposttext); } echo "\n"; }