Forums / Developer / Moving mass users from one user group to another.

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/