new account membership plugin set to neverExpire

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 28, 2015   (RSS)

By gregThomas - May 28, 2015

Hi Mark,

If you've used the Website Membership code generator to create your sign up form, there will be an array that is used to create the data that is added to the accounts section. You should see some code that looks like this in user-signup.php:

      $colsToValues = array();
      $colsToValues['createdDate=']     = 'NOW()';
      $colsToValues['updatedDate=']     = 'NOW()';
      $colsToValues['createdByUserNum'] = $CURRENT_USER['num'];
      $colsToValues['updatedByUserNum'] = $CURRENT_USER['num'];
      $colsToValues['neverExpires']      = '1';

If you add the code I've highlighted in green into your sign up page, the never expires checkbox will be ticked for the user. 

The colsToValues array uses the key to set the field name, and the value will be what gets entered into the field. You can use this array to pass any extra member account data you need into the database.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com