Dynamically Changing User Groups

Author Message

Frey Staso

Thursday 14 April 2005 2:22:35 pm

On my site, there are several different departments (say, mailroom, finance, administration for example) now each department has their own section and can only see/upload files there. I need to be able to let the department heads create new users on their own (without my support) for their own department.

Using user/register is a big step, but the problem is that I can only set ONCE where a user is "created" this is a problem because I need the Finance head to make new accounts that are automatically in the "finance" group and the administration head to make new accounts that are automatically in the "administration" group.

I know you can set where a new user is sent in the site.ini file, but my question is: how can I change that dynamically so that when they fill out the register form there is a drop down ezselector to let them pick their department in order to make a new user in that user group.

I SUPPOSE I could just make a new class for EACH department (all 15 of them) and then set the starting user group node ID number for each, but lets hope there is an easier way.

Thanks

Frey Staso

Tuesday 19 April 2005 8:26:57 am

Since I've seen my question asked before, I'm going to post how I got around this problem in case anyone needs it in the future.

Users and User Groups work just like any other content object (like an article) you don't need to make them using user/register. If you set up a button that sends the class id & node id it will create a new user in that node. This will, however, disable the email checking (which is okay for me, I was trying to disable it anyway)

Ekkehard Dörre

Tuesday 19 April 2005 8:58:21 am

You can use the content create toolbar in administration.
http://ez.no/ez_publish/documentation/customization/components/toolbars/how_to_customise_toolbar

But I don't know, if anybody can make a subtree limitation in this user group when creating this new user automatically.
Target is: One Folder, one user.

Greetings ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

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

Main resources:

Total runtime0.0150 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.1563151.2109
Module start 'layout' 0.00700.0022 739.367236.6484
Module start 'content' 0.00930.0042 776.015694.1563
Module end 'content' 0.01350.0015 870.171933.9922
Script end 0.0149  904.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002516.8111140.0002
Check MTime0.00117.4841140.0001
Mysql Total
Database connection0.002114.224210.0021
Mysqli_queries0.002214.446830.0007
Looping result0.00000.079510.0000
Template Total0.00117.510.0011
Template load0.00095.902110.0009
Template processing0.00021.607510.0002
Override
Cache load0.00064.275510.0006
General
dbfile0.00021.542380.0000
String conversion0.00000.052540.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