X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Moderated sign-up [3.5.x] (https://forum.x-cart.com/showthread.php?t=8997)

timc 08-20-2004 02:59 AM

Moderated sign-up [3.5.x]
 
Xcart Gold version - 3.5.8

Hello all - wondering if someone can help me with this one.

We would like to restrict the public from automatically gaining login access to the site to order products. We would like to authorise each new person signing up before there login is activated.

As far as i am aware we should be able to achieve this using the moderated signup feature in the general options of the admin area but for some reason it is not working.

At this point when the customer completes the registration page it automatically logs him in.

Any Idea's

Regards

Tim Cumming

B00MER 08-20-2004 11:27 PM

edit include/register.php find:

Code:

        if($usertype=="C" or ($usertype=="B" and $login=="")) {
                $auto_login = true;
                $login = $uname;
                $login_type = $usertype;
                $logged = "";
        }


And replace with:

Code:

        if($usertype=="C" or ($usertype=="B" and $login=="")) {
                if($newuser_info["membership"]==$newuser_info["pending_membership"]) {
                $auto_login = true;
                $login = $uname;
                $login_type = $usertype;
                $logged = "";
                }
        }


This will keep anyone from auto-logging in once they register until you set the membership.

Next include/login.php find:

Code:

if(!empty($user_data) && $password==text_decrypt($user_data["password"]) && !empty($password)) {

replace with:

Code:

if(!empty($user_data) && $password==text_decrypt($user_data["password"]) && !empty($password) && $user_data["membership"]==$user_data["pending_membership"]) {

This will keep users from loggin in with the newly created username/passwords until the membership is set.

Kudos! ;)

timc 08-21-2004 01:18 AM

Still no go
 
Thanks heaps KUDOS for the reply

I did everything you suggested and checked it several times but still with no luck

The register.php still works but still automatically logs the person in after they have signed up

I have a feeling it is not flagging new members as Pending Membership

Any suggestions


All times are GMT -8. The time now is 08:50 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.