xoopscube/legacy — pull request #14 by suin (2012-08-01 20:23:52+00:00)
Title: Add delegate point after user activation done

I need a delegate point after user activation done.

I suggest the name is `Legacy.Event.UserActivate.Success`.

And callback interface is like this:

```
function(UserUsersObject $user, array $config) {}
```

This delegate point will be useful for changing behavior after activation like `Legacy.Event.CheckLogin.Success`.

For example,

* Auto logging in after activation
* Tracking user conversions with affiliate program
* Change redirection massage

Auto logging in after activation example:

```php

mRoot->mDelegateManager;
$delegateManager->add('Legacy.Event.UserActivate.Success', function(UserUsersObject $user, array $config) {
if ( $config['activation_type'] == 0 ) {
//
// authorize here
//
$this->mRoot->mController->executeRedirect(XOOPS_URL, 3, "Logging in...");
}
});
}
}
```