Forums / Setup & design / Dynamically Changing User Groups

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

eZ debug

Timing: Jan 18 2025 19:12:09
Script start
Timing: Jan 18 2025 19:12:09
Module start 'content'
Timing: Jan 18 2025 19:12:10
Module end 'content'
Timing: Jan 18 2025 19:12:10
Script end

Main resources:

Total runtime0.8190 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 587.7344180.8281
Module start 'content' 0.00940.6634 768.5625551.6250
Module end 'content' 0.67280.1462 1,320.1875336.7734
Script end 0.8190  1,656.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.5753210.0002
Check MTime0.00160.1979210.0001
Mysql Total
Database connection0.00090.107610.0009
Mysqli_queries0.736489.91031940.0038
Looping result0.00240.29231920.0000
Template Total0.788596.320.3943
Template load0.00230.276020.0011
Template processing0.786295.994820.3931
Template load and register function0.00010.014010.0001
states
state_id_array0.00100.116610.0010
state_identifier_array0.00120.149120.0006
Override
Cache load0.00190.2303200.0001
Sytem overhead
Fetch class attribute can translate value0.00170.202230.0006
Fetch class attribute name0.00130.160450.0003
XML
Image XML parsing0.00150.182730.0005
class_abstraction
Instantiating content class attribute0.00000.001660.0000
General
dbfile0.00500.6071330.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs