In FEU prefs I've set the 'Default user expiry period' to 12 months, however when someone self registers (via Self-Registration) that user's expiry date defaults to five years? Can these 2 expiry dates be synchronised?
I'm also having problems with Self-Registration, in that it sends the wrong URL in the confirmation email. When the user clicks the links in their email it takes them to the sites homepage. Which PHP file in (www/cmsms1.6test/modules/SelfRegistration) holds the info for the 'smarty' tags:
{$url}
{$smallurl}
Maybe I can tweak these to form a valid URL that works on my site?
Thank you.
[SOLVED] Expiry Date on Self-Registration doesn't match that set in FEU
[SOLVED] Expiry Date on Self-Registration doesn't match that set in FEU
Last edited by rpr on Mon Mar 29, 2010 3:17 am, edited 1 time in total.
Re: Expiry Date on Self-Registration doesn't match that set in FEU
Hi,
What are versions of FEU and SelfRegistration?
vilkis
What are versions of FEU and SelfRegistration?
vilkis
Re: Expiry Date on Self-Registration doesn't match that set in FEU
Hi Vilkis, thanks for getting back.
Think I'm using the latest:
FEU v1.7.1
SelfRegistration v1.2.6
on CMSMS 1.6.7 "Teremba Bay"
Think I'm using the latest:
FEU v1.7.1
SelfRegistration v1.2.6
on CMSMS 1.6.7 "Teremba Bay"
Re: Expiry Date on Self-Registration doesn't match that set in FEU
there are newer versions of FEU and SelfRegistration. Next question - Do you use pretty url?
vilkis
vilkis
Re: Expiry Date on Self-Registration doesn't match that set in FEU
Thanks Vilkis, I am using pretty URLs and I noticed the 'release notes' on Self-Registration mentions pretty URLs. I'm using 'heirarchy' and 'page_extension' as part of that too.
But I'd still like to know if I can tweak those settings ({$url} {$smallurl}) if it still doesn't work?
Is there a fix for changing the default expiry date on Self-Reg from 60 months to 12 months?
Thanks.
But I'd still like to know if I can tweak those settings ({$url} {$smallurl}) if it still doesn't work?
Is there a fix for changing the default expiry date on Self-Reg from 60 months to 12 months?
Thanks.
Last edited by rpr on Sun Mar 28, 2010 4:31 pm, edited 1 time in total.
Re: Expiry Date on Self-Registration doesn't match that set in FEU
To Change the Expiry Date when a user user registers
it's located: SelfRegistration.Module.php
Line 586
simply change 5 to 1 and it will increase their expire date by 1 year when
they register. By default Version 1.2.6 this is how it works, it doesn't
plug into FUE module to get the info, it just runs on it's own
piece of code.
Here's the code if you just want to replace
it's located: SelfRegistration.Module.php
Code: Select all
// todo, figure out when users should expire
$expires = strtotime('+5 years');
simply change 5 to 1 and it will increase their expire date by 1 year when
they register. By default Version 1.2.6 this is how it works, it doesn't
plug into FUE module to get the info, it just runs on it's own
piece of code.
Here's the code if you just want to replace
Code: Select all
$expires = strtotime('+1 years');
Re: Expiry Date on Self-Registration doesn't match that set in FEU
Also, the URL and ShortURL are generated inside the same file SelfRegistration.module.php
Under the function:
Line: 890
The Following Code Creates those links:
Line: 907-908
and The functions for those CreateLinks
File: root/lib/classes/class.module.inc.php
Line: 1982
I'm not sure why but it then assigns them to smarty using the same commands,
not sure why they are seperate!:
Line: 911-912
O now, I see why they are seperated, one's for Text and ones for html emails.
Just supplying you with where they are located,
not really with answers, don't know enough about your problems
to answer it. But here's the locations you ask for.
Under the function:
Line: 890
Code: Select all
function _SendUserConfirmationEmail($id,$returnid,$address,$username,$group_id,$code)
Line: 907-908
Code: Select all
$url = $this->CreateLink($id,'default',$returnid,'',$parms,'',true,true);
$smallurl = $this->CreateLink( $id, 'default', $returnid, '', array('mode' => 'verify'),'',true, true);
File: root/lib/classes/class.module.inc.php
Line: 1982
Code: Select all
function CreateLink($id, $action, $returnid='', $contents='', $params=array(), $warn_message='', $onlyhref=false, $inline=false, $addttext='', $targetcontentonly=false, $prettyurl='')
{
$this->LoadFormMethods();
return cms_module_CreateLink($this, $id, $action, $returnid, $contents, $params, $warn_message, $onlyhref, $inline, $addttext, $targetcontentonly, $prettyurl);
}
not sure why they are seperate!:
Line: 911-912
Code: Select all
$this->smarty->assign('link',$this->CreateLink($id,'default',$returnid,$url,$parms,'',false,true));
$this->smarty->assign('smalllink',$this->CreateLink($id,'default',$returnid,$smallurl,array('mode'=>'verify'),'',false,true));
Just supplying you with where they are located,
not really with answers, don't know enough about your problems
to answer it. But here's the locations you ask for.
Last edited by cwboaze on Sun Mar 28, 2010 5:42 pm, edited 1 time in total.
Re: Expiry Date on Self-Registration doesn't match that set in FEU
Many thanks cwboaze, for all those code references. Really helpful!
The ability to change the default expiry date on SelfRegistration was important. I was going to abandon the confirmation email scenario, but the latest version of SelfRegistration now supports pretty URLs, so I might give it another go.
Thanks again.
The ability to change the default expiry date on SelfRegistration was important. I was going to abandon the confirmation email scenario, but the latest version of SelfRegistration now supports pretty URLs, so I might give it another go.
Thanks again.