Create a script for new user

Author Message

Bermudez Alban

Monday 13 February 2006 4:36:08 am

Hello world,

I'm download the extension which import user in ez-publish. This is the code which create the object user :

 $user = $this->create( $userID ); 
 $user->setAttribute('login', $user_temp_data["login"] );
 $user->setAttribute('email', $user_temp_data["email"] );
 $hashType = eZUser::hashType();
 $newHash = $user->createHash( $user_temp_data["login"],   
        $user_temp_data["password"], eZUser::site(), $hashType );
 $user->setAttribute( "password_hash_type", $hashType );
 $user->setAttribute( "password_hash", $newHash );
 $user->store();

But I have this problem, the hash is not good for ezpublish. When i want to connect, the system tell me my information are false. I must to go in the admin, modify my password and then, i can login. How can I create a valid password?

Thanks

Bermudez Alban

Monday 13 February 2006 6:45:37 am

I find my error... It was ma data which are false :(

For the interrest user, the code I write runs correctly :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.