Page 1 of 1

MAMS Registration

Posted: Sun Oct 16, 2022 12:42 pm
by AccentAvondschool
I had the MAMS registry working with the setting 'email address=username'. So far so good, great module.

But now I want the user to log in with his username. So I've created a new user property 'email' and set it to 'Required' in the group (if I don't do this, it misses the property and I get the message 'No valid email address field found').

But when I want to log in I get the message: 'You cannot register to become a member of this user group'? I have gone through all the settings, turned some on and off but the message remains.

The server error logs don't show anything special, I also turned on the debug function but I only see the registration of the error going into the database:
SELECT * FROM cms_module_mams_propdefn
SELECT * FROM cms_module_mams_grouppropmap ORDER BY group_id,sort_key DESC
INSERT INTO cms_adminlog (timestamp, user_id, username, item_id, item_name, action, ip_addr) VALUES (1665919210,1,'xxxxx',-1,'MAMSRegistration','Signup Validation Error: You cannot register to become a member of this user group','00.00.0.00')
(Of course I left out my username and IP number)
I'm stuck, so frustrating ;(

Re: MAMS Registration

Posted: Tue Oct 18, 2022 7:55 am
by AccentAvondschool
I looked in the code where the error message 'error_noregister' is called. That appears to be in the file 'action.signup.php' with the following piece of code:

Code: Select all

    // attempt to register to an absolutely verboten group
    $tmp = $this->GetPreference('noregister_groups');
    
    if($tmp)
    {
      $verboten = explode(',', $tmp);
      $tmp      = array_intersect($grpids, $verboten);
      
      if(count($tmp))
      {
        throw new \MAMSREGValidationError($this->Lang('error_noregister'));
      }
    }
If I change the output to implode(",", $tmp); it returns a '1'. Can I conclude from this that my group 'agroupname' is marked as a banned group somewhere? Where can I adjust this?

Code: Select all

 {MAMSRegistration group=agroupname}
Hmmm, if I disable throwing the 'banned group' error, I get a new error: 'No valid email address field found'.

Re: MAMS Registration

Posted: Tue Oct 18, 2022 9:52 am
by AccentAvondschool
Field 'username' is stored in table 'cms_module_mamsregistration_users'
Field 'email' is stored in table 'cms_module_mamsregistration_properties' but is never read

Code: Select all

id  user  title   data 	
0   0     email   name@domain.nl

Re: MAMS Registration

Posted: Wed Oct 19, 2022 7:57 am
by AccentAvondschool
Have removed all entire MAMS modules and reinstalled them, with different settings. And now it works with separate use of username and email. No idea what went wrong but I suspect that some settings have remained in the database with the previous setting 'email address=username' ??

Re: MAMS Registration

Posted: Sun Apr 09, 2023 6:27 pm
by master3395
AccentAvondschool wrote: Wed Oct 19, 2022 7:57 am Have removed all entire MAMS modules and reinstalled them, with different settings. And now it works with separate use of username and email. No idea what went wrong but I suspect that some settings have remained in the database with the previous setting 'email address=username' ??
Perhaps make a bug report here, if you suspect it can be a bug?
http://dev.cmsmadesimple.org/bug/list/1465