eZ Community » Forums » General » User login change => cannot access...
expandshrink

User login change => cannot access user image anymore

User login change => cannot access user image anymore

Thursday 04 February 2010 11:22:29 am - 1 reply

Hi,

I changed a user's login by executing a script like :

$user = eZUser::fetchByName($login);
if (is_object($user))
{
$user->setAttribute("login",$newLogin);
$user->store();
}

It seemed to work but, after republishing the user's object, it is now impossible to access every image linked to the user (photos)... I tried to define a new one in the back office, but no new image was created anywhere.

Did I forget something in the script ?

Thanks for your help

Hugo

Thursday 04 February 2010 9:28:01 pm

You probably need to republish the content object of the user.

Might be that login is setup as name pattern for user class on your site?

Also remember that login is part of password hash, so I think you'll need to change password as well if it should be possible to login to the account again.

Modified on Thursday 04 February 2010 9:28:33 pm by André R

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from