lat9:
Bulletin-board notifier support. Needs a change to /includes/modules/pages/account_edit/header_php.php to be able to distinguish between an email-address check for the current customer vs. an overall check for the email address, changing:
// check external hook for duplicate email address, so we can reject the change if duplicates aren't allowed externally
// (the observers should set any messageStack output as needed)
$nick_error = false;
$zco_notifier->notify('NOTIFY_NICK_CHECK_FOR_EXISTING_EMAIL', $email_address, $nick_error);
> to
> ```
// check external hook for duplicate email address, so we can reject the change if duplicates aren't allowed externally
// (the observers should set any messageStack output as needed)
$nick_error = false;
$zco_notifier->notify('NOTIFY_NICK_CHECK_FOR_EXISTING_EMAIL', $email_address, $nick_error[B], $nick[/B]);
Otherwise, a customer with a bulletin-board account can't change their password because the (unchanged) email address already associated with the nickname is going to come back as "already used".
But as a header_php.php file, doesn't it actually have direct access to $nick by declaring the variable as global within the observer making the passing of the value(s) unnecessary? This way the observer knows the value of $nick and any change will be available to follow after the notify was executed.
I mean I guess yeah the value could be passed to the observer, but it seems excessive unless there is some plan to modify the observer class operation to restrict it's access to only information specifically fed to it. Though the extra "hint" about what data should be handled does help those that seek to design further...