Tuesday 13 July 2010 6:33:47 am
Thanks for the link Stevo, I have download the extension and activated it .It allows to have a cookie with username information. I have set this in vlogin.ini.append.php:
# (optional) Cookie Name to use for user name UserNameCookieName=userNameVLogin ----------------------------------------------------------------------------------------------------------------------------------------- Although before your reply I found another solution that reach the same result(I started reading http://share.ez.no/forums/developer/static-cache-get-user-login-information-by-cookie-js): I modifids index.php as follow: <<
if ( $currentUser->isLoggedIn() )
{
$userID = $currentUser->attribute( 'contentobject_id' );
$userObject = $currentUser->attribute( 'contentobject' );
$userName = $userObject->name();
setcookie( 'username', $userName , 0, $cookiePath );
setcookie( 'userId', $userID , 0, $cookiePath );
setcookie( 'is_logged_in', 'true', 0, $cookiePath );
header( 'Etag: ' . $currentUser->attribute( 'contentobject_id' ) ); } >> This way I have also userID information and any other information I wanted . ----------------------------------------------------------------------------------------------------------------------------------------- Now I have to decide which solution is better: 1- when I 'll have to upgrade my ezpublish installation it would be better having to remember to change index.php file or it would be better having to update the extension and to test if this extension would work correctly with the upgrade?Can you suggest the better solution? 2- Another task: Now my apache log contains also cookie information with the logged user' username : There are many programms that allow to get statistics from apache log .Do you know if there is a program that could be better considering that my main log information is in the cookies? ----------------------------------------------------------------------------------------------------------------------------------------- Thank you all -
http://manuele.ath.cx
|