Moving mass users from one user group to another.

Author Message

John Smith

Tuesday 18 November 2008 7:47:23 am

Hope some one can help me. On one of my sites I need the following functionality.

1. Importing (1000 to 1500) users from a CSV file into ezpublish 4.0.1.

2. The user class needs attributes such as - First name, last name, username, password, email, address, phone, date of birth etc.

3. Once imported, users would be able to edit their own profiles from the public website.

4. When changes are made to the profile, administrator needs the changes to be approved.

5. Now on the administration site, need some sort of mechanism / module with the help of extension, which would help me in moving the users (within certain age range based on date of birth to and from) from one user group to another user group.

Any help and advise would be appreciated.

Thanks.

Maxime Thomas

Tuesday 18 November 2008 11:40:51 pm

Hi,

Some clues :
1. Make an extension with a script (one shot job) or cronjob (recurrent job) to read the CSV, convert it in PHP objects, create or update users and store them in the a group called "Authentified Users" (for example).

2. Go in the administration initerface and modify the content class as needed.

3. Create a role with the policies allowing the modification of the profile (content/create && content/edit && user/edit, if I can remember).

4. Set up a workflow in the backoffice.

5. Add a module to your extension. It will contain one view : "list" inwhich one you may sort or filter all the users by some criteria. Finally it will have a button move that will effectivelly move the users to the chosen group.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

John Smith

Wednesday 19 November 2008 1:31:59 am

First of all I would like to thank you for taking out your time.

Some clues :
1. Make an extension with a script (one shot job) or cronjob (recurrent job) to read the CSV, convert it in PHP objects, create or update users and store them in the a group called "Authentified Users" (for example).

2. Go in the administration initerface and modify the content class as needed.

3. Create a role with the policies allowing the modification of the profile (content/create && content/edit && user/edit, if I can remember).

4. Set up a workflow in the backoffice. 

I think upto here it seems quite straight forward by importing the users. Last night I did some digging where I found an extension named as "usercreator" which is capable of importing the user into the required customised class created before importing the users. After that some roles/policies and workflow of type "Event/Aprove" on the Section - Users will do the job.

5. Add a module to your extension. It will contain one view : "list" inwhich one you may sort or filter all the users by some criteria. Finally it will have a button move that will effectivelly move the users to the chosen 

Here it seems bit complicated. Maxime, would it be possible to explain this point bit more in detail or is there any extension which could give me some sort of idea how to pull all the usergroups and users based on some criteria. I think I need some sort of example or similar sort of extension from where I can pick things according to my requirements.

kracker (the)

Wednesday 19 November 2008 1:30:29 pm

Check it, <i>http://projects.ez.no/batchtool</i>

<i>//kracker

Lil Wayne : Tha Carter III : DontGetIt</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.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 31 2025 03:40:56
Script start
Timing: Jan 31 2025 03:40:56
Module start 'layout'
Timing: Jan 31 2025 03:40:56
Module start 'content'
Timing: Jan 31 2025 03:40:56
Module end 'content'
Timing: Jan 31 2025 03:40:56
Script end

Main resources:

Total runtime0.0313 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.0050 588.2656151.2266
Module start 'layout' 0.00500.0034 739.4922220.7188
Module start 'content' 0.00840.0216 960.21091,001.9609
Module end 'content' 0.03000.0012 1,962.171933.9922
Script end 0.0313  1,996.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00268.1560140.0002
Check MTime0.00113.5311140.0001
Mysql Total
Database connection0.00082.530310.0008
Mysqli_queries0.00216.629630.0007
Looping result0.00000.035010.0000
Template Total0.00092.710.0009
Template load0.00072.233210.0007
Template processing0.00020.504210.0002
Override
Cache load0.00051.566010.0005
General
dbfile0.006922.044380.0009
String conversion0.00000.025940.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