CMS MADE SIMPLE FORGE

Self Registration

 

[#11618] Self registration email link does not pass group assignment

avatar
Created By: Jack Skiba (nidus)
Date Submitted: Wed Oct 25 16:06:25 -0400 2017

Assigned To: Robert Campbell (calguy1000)
Version: 1.12
CMSMS Version: 2.2.3.1
Severity: Critical
Resolution: Works For Me
State: Open
Summary:
Self registration email link does not pass group assignment
Detailed Description:
When click on link in the email verification:
Error!
Insufficient number (or incorrect) parameters supplied to module

admin log:
SelfRegistration	no group parameter specified for the signup action

debug:
INSERT INTO cms_adminlog (timestamp, user_id, username, item_id, item_name,
action, ip_addr) VALUES (1508961308,1,'nidi',-1,'SelfRegistration','no group
parameter specified for the signup action','xxx.xxx.xxx.xxx')

in admin -> User Management -> Self Registration Module -> Users user has group
assignment


History

Comments
avatar
Date: 2018-01-27 09:56
Posted By: Robert Campbell (calguy1000)

I havenot had this issue.
      
avatar
Date: 2018-01-27 18:42
Posted By: Ruud van der Velden (ruudvdvelden)

I think it IS broken. If NOT using url_rewriting = mod_rewrite there is nothing
in the code telling the url in the verification email should have a 'verify'
mode parameter. Hence the default action of the SelfReg module is called without
group parameter.

 /*---------------------------------------------------------
   SendUserConfirmationEmail($address,$username,$code);
   NOT PART OF THE MODULE API
   ---------------------------------------------------------*/
protected function
_SendUserConfirmationEmail($id,$returnid,$address,$username,$code)
  {
      $config = cms_config::get_instance();
      $cmsmailer = new \cms_mailer;

      $cmsmailer->AddAddress( $address );
      $tpl = $this->CreateSmartyTemplate('selfreg_emailconfirm_template');
      $tpl->assign('name',$username);
      $tpl->assign('code',$code);
      $tpl->assign('sitename', $config['root_url']);
      $parms = [ 'sr_input_username' => $username, 'sr_input_code' => $code ];
      $parms = [ 'sr_data'=>base64_encode(serialize($parms)) ];
      $prettyurl = "Selfreg/confirm/$returnid/{$parms['sr_data']}";
$url =
$this->create_url($id,'default',$returnid,$parms,false,false,$prettyurl);
      $tpl->assign('url',$url);
      
Updates

Updated: 2018-01-27 09:56
resolution_id: => 11