I'm not surprised that it doesn't work with the same email for different users since eZ usually requires (depending on its settings) a unique email pr user. However, in my case, I'm setting a unique email, so it doesn't make sense.
Yeah, that's normal case, but you can set it to allow same email for different users. fromString method didn't take in account that. it's fixed in the master though.
just wondered if that could be your case. otherwise, dunno what could it be...
Actually i'm using it for creating new users coming from my custom login handler. i mean, user type their login and password, then a webservice is called. this webservice returns an xml with all the user info. following code is part of my function. let me know if i can help you.
$params['class_identifier'] = 'user';
$params['creator_id'] = $ini->variable( "UserSettings", "UserCreatorID" );;
$params['parent_node_id'] = $parent_node_id; //pulling the node id out of the parent
$params['section_id'] = eZContentObjectTreeNode::fetch( $parent_node_id )->attribute( 'object' )->attribute( 'section_id' ); // because for the project needs we need several users sections
$attributesData = array();
$attributesData['name'] = $nombre;
$attributesData['surname'] = $apellidos;
$attributesData['user_account'] = "$identifier|$mail|" . md5( $password ) . "|md5_user|0"; // last 0 means disabled account
$params['attributes'] = $attributesData;
$user = eZContentFunctions::createAndPublishObject( $params );
Thanks for the tip, Carlos. As it turns out, I had a bug in my code, so now it works fine for registering new users. However, it's still not updating the data for existing users. And as far as I can see, the data format should be the same.