create ezpublish users from a script

Author Message

Ruben Torres

Tuesday 06 April 2004 11:36:16 pm

Hello,

I'm migrating a users database to ezpublish and I want to use a script to create
all my users in ezpublish without having to do this one by one. What tables do I
have to use? Does someone has a functional script like this and wants
to share it with me? I would really appreciate this because Im in a hurry.

Using ezp 3.3-3 and postgresql 7.3.4-4 over Fedora.

Marco Zinn

Thursday 15 April 2004 2:30:04 pm

I suggest, that you have a look at the "contribution" section. There are scripts for migration ez2-DBs to ez3.
This includes user groups and users, which are read (via SQL) from an ez2-table or two and creates users in ez3 by calling the ezPublish API for this. This worked well for me and should be easy to adapt for another SQL DB, when you know and understand that structure.
Note, that you will need to make up your mind about permissions and roles, as this script does not take care of this, as the concept was changed completly between ez2 and ez3.
How many users do you need to migrate?
The import scripts are not very fast!

(PS: Maybe it's an option to create an ez2-like table structure from your data, so you could just "run" that existing script).

Marco
http://www.hyperroad-design.com

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 18 2025 22:11:16
Script start
Timing: Jan 18 2025 22:11:16
Module start 'layout'
Timing: Jan 18 2025 22:11:16
Module start 'content'
Timing: Jan 18 2025 22:11:16
Module end 'content'
Timing: Jan 18 2025 22:11:16
Script end

Main resources:

Total runtime0.0221 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.3594152.6250
Module start 'layout' 0.00710.0049 741.984439.4609
Module start 'content' 0.01200.0082 781.445389.3047
Module end 'content' 0.02020.0019 870.750030.3047
Script end 0.0221  901.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002410.7178140.0002
Check MTime0.00114.8886140.0001
Mysql Total
Database connection0.00083.692610.0008
Mysqli_queries0.005424.468830.0018
Looping result0.00000.127110.0000
Template Total0.00156.710.0015
Template load0.00083.602110.0008
Template processing0.00073.090310.0007
Override
Cache load0.00052.337110.0005
General
dbfile0.002511.268480.0003
String conversion0.00000.035640.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