I've gotten about as far as my poor reverse engineering will go and need some help.
In ROOT/modules/NMS/action.do_create_new_user.php at line 23 there is the following error condition:
Code: Select all
if( !isset($params['lists']) || count($params['lists']) == 0 )
{
$params['message'] = $this->Lang('error_selectonelist');
$params['error'] = 1;
$this->Redirect( $id, $action, $returnid, $params, !$admin );
return;
}
This redirects the page using the 'Redirect' command from the CMSmodule (
http://www.cmsmadesimple.org/apidoc/CMS/CMSModule.html#Redirect)
Passing the arguments in the url as query strings. This works fine for the subscribe process and outputs the correct error message.
I've tried to include it in action.do_usersettings.php to create a better error output, but it simply redirects to a blank page. When I looked at the string I could see the module setting was missing (in this case, 'usersettings') which when added outputs the right fields. But there's still no error message.
I checked my templates, and the error message condition is still there.
So, my two questions are:
1. How to I make the Redirect command go to the right section of the module 'usersettings'
2. How do I make it output the error message 'error_selectonelist'
Sorry if I'm overlooking something simple or doing something stupid, I have no PHP knowledge at all, just a simple XHTML/CSS monkey.
Thanks in advance...