Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Moderated sign-up [3.5.x]

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 08-20-2004, 02:59 AM
 
timc timc is offline
 

Newbie
  
Join Date: May 2004
Posts: 4
 

Default 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
__________________
Regards

Tim Cumming
Reply With Quote
  #2  
Old 08-20-2004, 11:27 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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!
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 08-21-2004, 01:18 AM
 
timc timc is offline
 

Newbie
  
Join Date: May 2004
Posts: 4
 

Default 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
__________________
Regards

Tim Cumming
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:57 AM.

   

 
X-Cart forums © 2001-2020