SelfRegistration. Change +5 years expires by default.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rafa-el
New Member
New Member
Posts: 2
Joined: Tue Dec 02, 2008 9:40 am

SelfRegistration. Change +5 years expires by default.

Post by rafa-el »

I need to change +5 years expires by default when a new user registers.

where I can change it?
jimbabwe
Forum Members
Forum Members
Posts: 29
Joined: Sat Nov 18, 2006 8:09 pm

Re: SelfRegistration. Change +5 years expires by default.

Post by jimbabwe »

I haven't confirmed it works, but looks like you can edit SelfRegistration.module.php:    $expires = strtotime('+5 years');

You probably already know how to look for things like this, but here's a basic set of steps that my help others who come across this post...

Any easy way to find things like this, especially if you have phpmyadmin:

1. locate the table that holds the field/variable you are looking for

In this case, I looked at cms_module_feusers_users and found the field "expires"

2. search the module (i.e., SelfRegistration) for an update statement or similar where "expires" is used or look for a variable for "expires".

Example:
grep "expires" ./*
./SelfRegistration.module.php:    $expires = strtotime('+5 years');
./SelfRegistration.module.php:    $result = $feusers->AddUser( $username, $password, $expires, $do_md5 );
./SelfRegistration.module.php:    $expires = $db->DbTimeStamp(strtotime( $expirycode ));
./SelfRegistration.module.php:    $dbresult = $db->Execute( $q, array( $expires ) );
./SelfRegistration.module.php:    $expires = $db->DbTimeStamp(strtotime( $expirycode ));
./SelfRegistration.module.php:    $dbresult = $db->Execute( $q, array( $expires ) );
./SelfRegistration.module.php:    $dbresult = $db->Execute( $q, array( $expires ) );

3. make a backup copy of any file before you change it.

4. make your change and test.

Of course, it's best if you have a development site to test vs testing a production server/domain.
Post Reply

Return to “Modules/Add-Ons”