It was a pain to make the default interface to select a group
default was set to copy the nickname of the user group.
/config/site.php add the following to
The following content /config/site_events.php create
The following content /models/application_user.php create
default was set to copy the nickname of the user group.
/config/site.php add the following to
<?php define('ENABLE_APPLICATION_EVENTS', true); ?>
The following content /config/site_events.php create
<?php Events::extend('on_user_add', 'ApplicationUser', 'setupUserJoinInfo', 'models/application_user.php'); ?>
The following content /models/application_user.php create
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); define('DEFAULT_USERNAME', "default"); class ApplicationUser { public function setupUserJoinInfo($ui) { $uo = UserInfo::getByUserName(DEFAULT_USERNAME); if (is_object($uo)) { $groups = new GroupList($uo,true); foreach ($groups->gArray as $g){ $_POST['gID'][] = $g->gID; } } } } ?>
Hi Kino
Can you give me a little more explanation on what you wrote here?
Does this put a new registrant in a single default group or can the registrant choose the group they are placed in?
Thanks!
Can you give me a little more explanation on what you wrote here?
Does this put a new registrant in a single default group or can the registrant choose the group they are placed in?
Thanks!
I think you can reference the code below.
/concrete/models/userinfo.php at line 137.
and