New Users are unlocked - i want them to be locked...

Author Message

Timo Bahr

Wednesday 30 June 2010 9:34:14 am

...at registration and only get unlocked by an Administrator. Couldn't find anything - any ideas?

Nicolas Pastorino

Wednesday 30 June 2010 10:52:21 am

Hi Timo,

It should be sufficient to set the following setting to blank (empty string) :

[UserSettings]
VerifyUserType=

in an override of site.ini.

The freshly registered user won't be notified through email, and its account will remain disabled.

You may want the website's administrator to be notified when a new user registers, to make sure all of them are taken care of. You may want to check the following settings for this, still in site.ini :

[UserSettings]
RegistrationFeedback=
RegistrationEmail=

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Timo Bahr

Wednesday 30 June 2010 11:28:44 am

Hi Nicolas,

thanks for your answer - but it doesnt work. New Users are prompt loged & activated after registration. Any more ideas?

Nicolas Pastorino

Wednesday 30 June 2010 11:47:11 pm

Hi Timo,

Which version of eZ are you running ?

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Timo Bahr

Thursday 01 July 2010 2:15:58 am

Hey Nicolas,

4.2.0.!

Cheers!

Nicolas Pastorino

Sunday 04 July 2010 2:51:12 am

Hi Timo,

On a 4.2 version, take a look at kernel/user/register.php l.199 to l.252, you'll notice it is possible to create a custom activation handler, to which all user activation-related behaviour is delegated. It should among other avoid running the following code, where user account activation takes place :

if ( eZOperationHandler::operationIsAvailable( 'user_activation' ) )
                {
                    $operationResult = eZOperationHandler::execute( 'user',
                                                                    'activation', array( 'user_id'    => $userID,
                                                                                         'user_hash'  => $hash,
                                                                                         'is_enabled' => false ) );
                }
                else
                {
                    eZUserOperationCollection::activation( $userID, $hash, false );
                }

The return value of the 'verifyUser()' method in your custom handler (see how to plug it in in site.ini l.413 to 425) lets you control whether the registration email should be sent or not.

Let us know how it goes,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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 18 2025 01:58:08
Script start
Timing: Jan 18 2025 01:58:08
Module start 'layout'
Timing: Jan 18 2025 01:58:08
Module start 'content'
Timing: Jan 18 2025 01:58:08
Module end 'content'
Timing: Jan 18 2025 01:58:08
Script end

Main resources:

Total runtime0.0184 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.0084 589.2813152.6563
Module start 'layout' 0.00840.0024 741.937539.5078
Module start 'content' 0.01080.0052 781.445397.5234
Module end 'content' 0.01600.0023 878.968838.3047
Script end 0.0183  917.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002815.2415140.0002
Check MTime0.00126.5801140.0001
Mysql Total
Database connection0.002312.515910.0023
Mysqli_queries0.002513.573430.0008
Looping result0.00000.065010.0000
Template Total0.00179.310.0017
Template load0.00105.356410.0010
Template processing0.00073.933810.0007
Override
Cache load0.00073.896110.0007
General
dbfile0.00031.579880.0000
String conversion0.00000.049440.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