Monday 30 May 2011 8:40:32 am
Hello everybody! When new users register themselves, they have to wait for the administrator to activate their account (...removed the email activation feature). But I would like to add a shortcut which will allow the administrator to move its website's users under a group he wants them to belong, directly from the user setting page. For this I added a new block with a simple select field recalling the list of available users groups in the setting.tpl (design/admin2/templates/user/).
<div class="block">
<label>{'Move this user under a users group'|i18n( 'design/admin/user/setting' )}:</label>
{def $users_groups=fetch('content', 'list', hash('parent_node_id', 199))}
<select name="users_groups">
<option value="">{'Please select'|i18n( 'design/admin/user/setting' )}</option>
{foreach $users_groups as $group}
<option value="{$group.node_id}">{$group.name}</option>
{/foreach}
</select>
</div> Technically when he ticks the checkbox, selects the desired group and clicks ok, the user will be active and located under its new group node. I guess, in order to accomplish this, the file I would need to alter is kernel/user/activate.php, right? Since I have had unpleasant experiences with kernel files, playing with it freaks me out a bit. Found something on the subject http://ezpedia.org/snippet/php_snippet_moving_a_node. Do I need to integrate a functionality like that in that activate.php file? Thanks a lot!
loredanaebook.it
|