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.

eZ debug

Timing: Jan 19 2025 04:37:30
Script start
Timing: Jan 19 2025 04:37:30
Module start 'layout'
Timing: Jan 19 2025 04:37:30
Module start 'content'
Timing: Jan 19 2025 04:37:30
Module end 'content'
Timing: Jan 19 2025 04:37:30
Script end

Main resources:

Total runtime0.0252 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 590.2734152.6250
Module start 'layout' 0.00750.0057 742.898439.4453
Module start 'content' 0.01310.0089 782.343889.2422
Module end 'content' 0.02200.0032 871.585930.3047
Script end 0.0252  901.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003513.7115140.0002
Check MTime0.00135.3009140.0001
Mysql Total
Database connection0.00103.777710.0010
Mysqli_queries0.004919.427230.0016
Looping result0.00000.119110.0000
Template Total0.00239.210.0023
Template load0.00114.506210.0011
Template processing0.00124.641410.0012
Override
Cache load0.00062.493610.0006
General
dbfile0.00051.996680.0001
String conversion0.00000.044440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs