Share » Forums » Install & configuration » New Users are unlocked - i want them...

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

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

Wednesday 30 June 2010 9:34:14 am - 5 replies

Author Message

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu