Codoforum related discussions
HybridAuth default user status

There is a little bug in auth with fb and others. If you log in with hybridauth, the user status is approved by default, not following the global settings->Account registrations require admin approval ? check box.

modifying /sites/default/plugins/uni_login/uni_login.php

line 145

$reg->user_status = 1; //approved user

to

$reg->user_status = 0; //not approved user

and ./sites/default/plugins/sso/sso.php
line 52 replace

$reg->user_status = 1;

with

$reg->user_status = 0;

solved the problem.

can someome ( maybe @adesh1414127033 ) give me the global variable name of the checkbox in parameters to modify the code and follow the default policy ?

There is a little bug in auth with fb and others. If you log in with hybridauth, the user status is approved by default, not following the global settings->Account registrations require admin approval ? check box. modifying /sites/default/plugins/uni_login/uni_login.php line 145 ```` $reg->user_status = 1; //approved user ```` to ```` $reg->user_status = 0; //not approved user ```` and ./sites/default/plugins/sso/sso.php line 52 replace ```` $reg->user_status = 1; ```` with ```` $reg->user_status = 0; ```` solved the problem. can someome ( maybe @adesh1414127033 ) give me the global variable name of the checkbox in parameters to modify the code and follow the default policy ?

please, excuse my bad english! ( i'm french, and i know, it's not a good excuse ! ;) )

edited Oct 6 '16 at 11:04 am

If you upgrade HybridAuth to 2.7.0, yes.
you can log on with twitter,fb,google blocked by default, and asked for your mail confirmation.

i forgot a modification, corrected previous message smile

If you upgrade HybridAuth to 2.7.0, yes. you can log on with twitter,fb,google blocked by default, and asked for your mail confirmation. i forgot a modification, corrected previous message :)

please, excuse my bad english! ( i'm french, and i know, it's not a good excuse ! ;) )

I reply to myself for the variable:

use this code for the 2 modifcations:

            $reg_req_admin = \CODOF\Util::get_opt('reg_req_admin');
            $reg->user_status = 0;
            if ($reg_req_admin != 'yes') {
                    $user_status = 1;
            }
I reply to myself for the variable: use this code for the 2 modifcations: ```` $reg_req_admin = \CODOF\Util::get_opt('reg_req_admin'); $reg->user_status = 0; if ($reg_req_admin != 'yes') { $user_status = 1; } ````

please, excuse my bad english! ( i'm french, and i know, it's not a good excuse ! ;) )

thanks, works fine !
I moved this line line 147 ( after creating) to allow control of new users, and moved the default header line ( for registered users) line 91 ( to allow modification of the default url by tests ).

maybe a good idea to set the default location as global parameter ?

thanks, works fine ! I moved this line line 147 ( after creating) to allow control of new users, and moved the default header line ( for registered users) line 91 ( to allow modification of the default url by tests ). maybe a good idea to set the default location as global parameter ?

please, excuse my bad english! ( i'm french, and i know, it's not a good excuse ! ;) )

edited Oct 10 '16 at 10:09 am
141
3
1
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft