I was bashing my head trying to get this module to work and discovered the portion that was causing it to fail to subscribe (you would submit and just hit a blank page).

// if (count($arrprofile) > 0 && module_exists('profile')) {
// profile_load_profile($account);
// foreach ($arrprofile as $name) {
// if ($account->$name) {
// $item = $account->$name;
// }
// else {
// $item = $edit[$name];
// }
// if ($item) {
// $mailname .= $item ." ";
// }
// }
// $mailname=rtrim($mailname);
// }

With this commented out its up and running as expected, I dont have the time to 'shoot it at the moment as this sites timeframe is insane, just happy its working for now. When I have some time in a week or so I'll revisit this and debug some more. I'm happy to answer any questions in the meantime.

Comments

samuelet’s picture

Thanks for bug reporting.
That portion of code is related to the profile module and its user mailman register setting.
As you said, it only affects the mail realname of the user in mailman.

I need some information because i can't reproduce it:
What's your drupal release? What modules are enabled (mainly those related to profile managment)?
What's the User Mailman register profile settings?
If you can, it'd be useful also to check for apache logs.

Blitter’s picture

Drupal 5.1
Stock Profile

"Profile module:
Retrieve the display name of mail address from this Profile module field. Multiple fields have to be comma separated. Optional"
Is empty

samuelet’s picture

It's strange. The code you have commented is executed only when the module profile setting is not empty.
If you have time, a good testing is to add this line:

   if (count($arrprofile) > 0 && module_exists('profile')) {
+ var_dump($arrprofile)
   profile_load_profile($account);

and check if the variable value is outputed in the page.

Blitter’s picture

Your code addition returned:
array(1) { [0]=> string(0) "" }

Error log:
Cannot access empty property in user_mailman_register.module on line 190

samuelet’s picture

Status: Active » Needs review
StatusFileSize
new988 bytes

Ok, now the problem is clear to me.
Could you try if this patch solve?

samuelet’s picture

StatusFileSize
new2.33 KB

A better patch to test.
With this, you can empty the profile setting if it was previously configured.

Blitter’s picture

Status: Needs review » Reviewed & tested by the community

Fixed,

I've tested it with profile fields for the name and without, both function as expected.

samuelet’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.