Forums / Developer / User editing self in multi lang site ! [HELP]

User editing self in multi lang site ! [HELP]

Author Message

Selmah Maxim

Wednesday 09 July 2003 5:51:05 am

Now what to do with this ?!?!?!

should user register his self per site ?!?!

when user trying to edit his profile in /hu/ site (or /ar/,/he/) I get just the submit buttons with no inputs !!!

But it`s work fine in /en/ !!!

what the wrong here is this kind of bug or am doing it with the wrong way !!!

Selmah Maxim

Wednesday 09 July 2003 7:59:23 am

again answered to my self :)

I slove it by editing content/edit.php ..

here is the code .. maybe will be helpful for some1, or maybe have better idea :

$UserClassID = $ini->variable( 'UserSettings', 'UserClassID' ) ;
if($classID == $UserClassID)
{
$CurrentLanguage = eZContentObject::defaultLanguage();
$ObjLang=$obj->CurrentLanguage;
$versionObj=$obj->attribute('current');
$version=$versionObj->attribute( "version" );
if($CurrentLanguage !=$ObjLang)
{
$Site = $ini->variable( 'SiteSettings', 'SiteURL' ) ;
$RdSite= "http://".$Site."index.php/".$ObjLang."/content/edit/".$ObjectID."/";
echo "<meta http-equiv='refresh' content='0;URL=$RdSite'>";
return EZ_MODULE_HOOK_STATUS_CANCEL_RUN;
}
}