SelfRegistration: omissions of controltypes

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
32Beat

SelfRegistration: omissions of controltypes

Post by 32Beat »

Hello all,

First of all Hail & Praise to the developers of this fantastic opensource initiative. I am currently investigating the applicability of several CMS solutions, and CMSms is currently my favorite, due to its ease of use and code setup.

One of the functionalities i am trying to implement is user registration via the SelfRegistration module. This all works as advertised, except when i tried to extend the user properties to include a Radiobutton group, this didn't display. Diggin through the code revealed that there seem to be only 5 controloptions for the function "_UserDisplayRegistrationForm1" in the SelfRegistration "funtions.php" file.

Adding this controloption myself, i get an additional oddity in the CGUserDirectory module (and probably elsewhere) because the userproperties are displayed using a test like this:

Code: Select all

if( !empty($tmp[$j]['data']) && $tmp[$j]['data'] != '<notset>' )
However, if the radiobutton represents a value of 0 (decimal 0), then apparently the above if-statement evaluates to false, and subsequently the property and data is not displayed. The above mentioned userproperty code appears in different places, so I'm not sure where to file this as a bug report. In addition, it may be that this problem occurs in a more general sense, so i thought i mention it here in the forum. My apologies if this is not the correct place for it.

But again, other then some minor issues, i am having a ball, and think CMSms will most likely become my CMS of choice.
NaN

Re: SelfRegistration: omissions of controltypes

Post by NaN »

I'm no programmer but when reading this: http://www.php.net/manual/en/function.empty.php I believe this really seems to be an issue and should be fixed.

How to file a bug?
See here: http://forum.cmsmadesimple.org/index.ph ... #msg161122

But as you mentioned this seems to be used in many cases so I guess it would take some time to fix this.
But thanks for the hint.
I wouldn't have found this even in my own scripts.
Post Reply

Return to “Developers Discussion”