Importing users from csv

Author Message

Andy Woods

Wednesday 18 May 2011 6:47:00 am

Hi,

Is it possible to import users from a csv file?

I have searched the forum and found a few posts but I haven't found any that describe a simple process to do it.

Thanks,

Andy

Jérôme Vieilledent

Wednesday 18 May 2011 7:05:05 am

Hello

You can do so with SQLIImport extension ;)

Andy Woods

Wednesday 18 May 2011 7:58:54 am

I've had a quick look at the extension but can't see any information that explains how to import users.

Have you used it to import users?  Is it a straightforward process?

Is this the easiest way to import users?

Thanks,

Andy

Jérôme Vieilledent

Thursday 19 May 2011 1:05:53 am

Hi Andy

Users in eZ Publish are actually content objects with an ezuser attribute, so it is straightforward :).

I already made an implementation of user import in my JanrainAuth extension (to connect user from social networks like Facebook). Take a look at the JanrainAuth class, in getUser() method.

You also might want to read the SQLIImport fromString() Appendix to learn how to deal with ezuser datatype. Take also a look at the documentation because there is a set of classes to handle CSV files ;).

Cheers !

Andy Woods

Friday 20 May 2011 2:32:22 am

Has anyone uses the user_import extension?

  http://projects.ez.no/user_import

I've installed it but I can't work out how to use it.

Andy

scrieler _

Monday 23 May 2011 4:39:28 am

Can be that this isn't compatible with your ez version.

Try the sqliimport extension first, looks good :)

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 01:10:04
Script start
Timing: Jan 18 2025 01:10:04
Module start 'layout'
Timing: Jan 18 2025 01:10:04
Module start 'content'
Timing: Jan 18 2025 01:10:06
Module end 'content'
Timing: Jan 18 2025 01:10:06
Script end

Main resources:

Total runtime1.7842 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.0469152.6250
Module start 'layout' 0.00510.0033 741.671939.4531
Module start 'content' 0.00841.7743 781.1250577.2344
Module end 'content' 1.78270.0015 1,358.359412.1641
Script end 1.7841  1,370.5234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.1781160.0002
Check MTime0.00130.0732160.0001
Mysql Total
Database connection0.00080.045710.0008
Mysqli_queries1.720896.4503700.0246
Looping result0.00080.0463680.0000
Template Total1.751398.220.8756
Template load0.00240.136620.0012
Template processing1.748898.019720.8744
Template load and register function0.00020.012210.0002
states
state_id_array0.00330.187010.0033
state_identifier_array0.00160.088620.0008
Override
Cache load0.00210.1172390.0001
Sytem overhead
Fetch class attribute can translate value0.00070.039330.0002
Fetch class attribute name0.00120.066170.0002
XML
Image XML parsing0.00200.110630.0007
class_abstraction
Instantiating content class attribute0.00000.002680.0000
General
dbfile0.00090.0482170.0001
String conversion0.00000.001740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs