Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Disable New Customer Registration Rate Topic   - - - - -

 
  • pbannette
  • Senior Member
  • Members
  • Join Date: 09-Aug 07
  • 1036 posts

Posted 01 June 2018 - 11:06 PM #1

What is the best method to disable/prevent new customer registration while still allowing current customers with accounts to log in and modify account? I just don't want new accounts created.

 

This is the page I don't want to be used: /profiles-add/

Tried commenting out sections of .tpl files including: / templates / views / profiles / update.tpl, but nothing worked.

Thank you,

Bob


Version CS-Cart 4.3.5


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11001 posts

Posted 02 June 2018 - 12:27 AM #2

Here is a description of how I'd do it (UNTESTED).

+ create a app/addons/my_changes/controllers/frontend/profiles.pre.php file

+ Have content in that file similar to:

if( !defined('BOOTSTRAP') ) die('Access denied');
 
if( $_SERVER['REQUEST_METHOD'] != 'POST' ) {
  switch($mode) {
    case 'update':
      if( !empty($_REQUEST['user_id']) )
        return array(CONTROLLER_STATUS_OK);
      // else fall through
    case 'add':
      fn_set_notification('E', __("error"), "New user registration is disabled.");
      fn_redirect(fn_url());
  }
}
return array(CONTROLLER_STATUS_OK);

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • pbannette
  • Senior Member
  • Members
  • Join Date: 09-Aug 07
  • 1036 posts

Posted 02 June 2018 - 12:32 PM #3

Thanks tbirnseth,

I tried your suggestion (thank you) and what happens is the code is printed at the top of the page. No errors or functional changes.

At the top of page after clicking Registration:

if( !defined('BOOTSTRAP') ) die('Access denied'); if( $_SERVER['REQUEST_METHOD'] != 'POST' ) { switch($mode) { case 'update': if( !empty($_REQUEST['user_id']) ) return array(CONTROLLER_STATUS_OK); // else fall through case 'add': fn_set_notification('E', __("error"), "New user registration is disabled."); fn_redirect(fn_url()); } } return array(CONTROLLER_STATUS_OK);

 

Also, does not impact registration from the cart page.

 

The reason I want to do this is that all the new registrations for the last several months are from Russia or a few from other countries. I track the IP addresses to know spammers. I end up disabling the account and then blocking their IP address.

Every day there is a new one. Just had new account created an hour ago.

Not using the site much so don't need to register new users.

Thanks for your help.

Bob


Version CS-Cart 4.3.5


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3691 posts

Posted 02 June 2018 - 01:41 PM #4

Are you not using captcha?



 
  • pbannette
  • Senior Member
  • Members
  • Join Date: 09-Aug 07
  • 1036 posts

Posted 02 June 2018 - 02:24 PM #5

Yes, I am using captcha. Standard one with 4.3.5. I increased the number of characters to 8 and made all profile fields required so not just user name and email. Did this a few months ago.

 

I did go into translations and removed all the words related to Register and Registration. This actually removed the link to Register in My Account (Sign in link works) and partially in the cart. I'll see how this works, just probably not the best way.

Thank you,

Bob


Version CS-Cart 4.3.5


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11001 posts

Posted 02 June 2018 - 03:22 PM #6

Thanks tbirnseth,

I tried your suggestion (thank you) and what happens is the code is printed at the top of the page. No errors or functional changes.

At the top of page after clicking Registration:

if( !defined('BOOTSTRAP') ) die('Access denied'); if( $_SERVER['REQUEST_METHOD'] != 'POST' ) { switch($mode) { case 'update': if( !empty($_REQUEST['user_id']) ) return array(CONTROLLER_STATUS_OK); // else fall through case 'add': fn_set_notification('E', __("error"), "New user registration is disabled."); fn_redirect(fn_url()); } } return array(CONTROLLER_STATUS_OK);

 

Also, does not impact registration from the cart page.

 

The reason I want to do this is that all the new registrations for the last several months are from Russia or a few from other countries. I track the IP addresses to know spammers. I end up disabling the account and then blocking their IP address.

Every day there is a new one. Just had new account created an hour ago.

Not using the site much so don't need to register new users.

Thanks for your help.

Bob

It sounds like you did not use opening <?php tags in your file.  I didn't include them in the code example.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3691 posts

Posted 02 June 2018 - 05:10 PM #7

The standard captcha no longer works and that's why CSC replaced it with Google recaptcha.  It's not available in your version but there are a couple of free ones in the marketplace that should work with your version.



 
  • oleg.gorshkov
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3136 posts

Posted 04 June 2018 - 06:16 AM #8

Hello!

 

Please install one of the Google recaptcha add-ons from marketplace.


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Mega SEO Package - All you need for your SEO


 
  • pbannette
  • Senior Member
  • Members
  • Join Date: 09-Aug 07
  • 1036 posts

Posted 04 June 2018 - 09:30 AM #9

tbirnseth: I fixed the code and now it works in the My Account section-thank you,

I will look at the replacement recaptcha add-ons. It did appear that the last fake registrations might have been manual since all the profile fields were required and were completed.

Thank you,

Bob


Version CS-Cart 4.3.5


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11001 posts

Posted 04 June 2018 - 07:43 PM #10

Bob,  Strongly suggest that you try the recaptcha solution FIRST and only do something like I recommended as a last resort.  I had thought you already had a recaptcha solution in place and it was not eliminating your false registrations.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • pbannette
  • Senior Member
  • Members
  • Join Date: 09-Aug 07
  • 1036 posts

Posted 04 June 2018 - 08:06 PM #11

tbirnseth,

Yes, I will get the recaptcha and install it. Is there more than one version of recaptcha? I have seen the ones on the Marketplace.

Thank you, Looks like i actually registered for recapture a long time ago and for some reason did not install it. Maybe because there were no addons created then.

Bob


Version CS-Cart 4.3.5


 
  • termalert
  • Senior Member
  • Members
  • Join Date: 14-Jan 09
  • 936 posts

Posted 23 June 2018 - 01:56 AM #12

As stated earlier...

The standard captcha no longer works and that's why CSC replaced it with Google recaptcha.

I am using Version 4.3.9 and the captcha works just fine therefore I assume you are talking about

more recent versions of CS-Cart.

Google re-captcha is infuriating where road signs and cars are concerned and I won't put my

customers through this so...

is the 'invisible' version of re-captcha working OK for you guys ??