mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
New hook: HOOK_ACCOUNT_CREATE_CHARACTER_AFTER
Possibility to change character after create
This commit is contained in:
parent
b1224d9d1a
commit
56631bdf27
@ -58,6 +58,7 @@ define('HOOK_ACCOUNT_LOGIN_AFTER_PASSWORD', ++$i);
|
||||
define('HOOK_ACCOUNT_LOGIN_AFTER_REMEMBER_ME', ++$i);
|
||||
define('HOOK_ACCOUNT_LOGIN_AFTER_PAGE', ++$i);
|
||||
define('HOOK_ACCOUNT_LOGIN_POST', ++$i);
|
||||
define('HOOK_ACCOUNT_CREATE_CHARACTER_AFTER', ++$i);
|
||||
define('HOOK_ADMIN_HEAD_END', ++$i);
|
||||
define('HOOK_ADMIN_HEAD_START', ++$i);
|
||||
define('HOOK_ADMIN_BODY_START', ++$i);
|
||||
|
@ -260,6 +260,20 @@ class CreateCharacter
|
||||
}
|
||||
}
|
||||
|
||||
global $hooks;
|
||||
if (!$hooks->trigger(HOOK_ACCOUNT_CREATE_CHARACTER_AFTER,
|
||||
[
|
||||
'account' => $account,
|
||||
'player' => $player,
|
||||
'name' => $name,
|
||||
'sex' => $sex,
|
||||
'vocation' => $vocation,
|
||||
'town' => $town,
|
||||
]
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
global $twig;
|
||||
$twig->display('success.html.twig', array(
|
||||
'title' => 'Character Created',
|
||||
|
Loading…
x
Reference in New Issue
Block a user