37
A small change made:
With this code :
le="color: #000000"><?php $profile_handler =& xoops_getmodulehandler('profile','profile'); $profile = $profile_handler->get($xoopsUser->getVar('uid')); $date_birthday = date('d/m/Y', $profile->getVar('date_birthday')); $xoopsTpl->assign('date_birthday',$date_birthday);
The result is always linked to the connected member.
If someone tries to see another profile, he'll always see its own birthday date !
You must change this code, with :
le="color: #000000"><?php $profile_handler =& xoops_getmodulehandler('profile','profile'); $uidyogurt = intval($_GET['uid']); //get uid from url if ($uidyogurt <= 0) { //if no valid uid passed to url if (is_object($xoopsUser)) {//if member $profile = $profile_handler->get($xoopsUser->getVar('uid'));} //get uid for the connected member else { header('location: ' . XOOPS_URL); //back to homepage - redirect wherever you want exit();} } else {//if a correct uid passed to url - eg. : index.php?uid=12 $profile = $profile_handler->get($uidyogurt);}//get uid passed to url to take right data from profile $date_birthday = date('d/m/Y', $profile->getVar('date_birthday')); $xoopsTpl->assign('date_birthday',$date_birthday);
French version here.
Thank to
bendenice for having reported this bug.