Forums / Setup & design / Importing users from csv

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 :)

eZ debug

Timing: Jan 17 2025 22:40:11
Script start
Timing: Jan 17 2025 22:40:11
Module start 'content'
Timing: Jan 17 2025 22:40:12
Module end 'content'
Timing: Jan 17 2025 22:40:12
Script end

Main resources:

Total runtime1.4438 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.8281180.8438
Module start 'content' 0.00671.4345 769.6719582.3125
Module end 'content' 1.44120.0026 1,351.984446.1094
Script end 1.4437  1,398.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2154140.0002
Check MTime0.00130.0894140.0001
Mysql Total
Database connection0.00090.064010.0009
Mysqli_queries1.393796.5300710.0196
Looping result0.00070.0462690.0000
Template Total1.413097.920.7065
Template load0.00220.150120.0011
Template processing1.410897.717920.7054
Template load and register function0.00020.016610.0002
states
state_id_array0.00260.178610.0026
state_identifier_array0.00170.114820.0008
Override
Cache load0.00190.1302390.0000
Sytem overhead
Fetch class attribute can translate value0.00060.041830.0002
Fetch class attribute name0.00130.093370.0002
XML
Image XML parsing0.00080.052730.0003
class_abstraction
Instantiating content class attribute0.00000.001880.0000
General
dbfile0.00090.0605190.0000
String conversion0.00000.000430.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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