S
S
strify_252019-05-14 17:38:51
1C-Bitrix
strify_25, 2019-05-14 17:38:51

How to make a user inactive after registration?

Hello. It is necessary to make sure that the user, after registration, cannot enter his personal account until the confirmation of the site administrator. That is, by default, the user should be inactive.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Proger, 2019-05-14
@strify_25

do this
1) "OnAfterUserRegister" event ( https://dev.1c-bitrix.ru/api_help/main/events/onaf...
call the event
2) if the registration was successful in $arFields["USER_ID"] the user ID is stored
3 ) CUser::Update use this function ( https://dev.1c-bitrix.ru/api_help/main/reference/c...
change to "ACTIVE" => "Y", to "ACTIVE" => "N ",
which gives us the inactivity of the new user, after the admin gives the rights it will be active.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question