Binding hooks when applicable
Closed this issue · 1 comments
Quy commented
What are your thoughts on binding hooks when applicable? For this addon, bind only for guests as follows:
if ($this->is_configured())
{
if ($pun_user['is_guest'])
{
$manager->bind('register_after_validation', array($this, 'hook_register_after_validation'));
$manager->bind('register_before_submit', array($this, 'hook_register_before_submit'));
}
}
franzliedke commented
I wouldn't bother, to be honest. We're just storing two small arrays in any case.
I'd be too worried about forgetting this, if, at some point, the conditions for the addon to be loaded were to change.
Feel free to send the pull, though. And thanks for reviewing!