# HG changeset patch # User Dan # Date 1231023266 18000 # Node ID 4629ad98ee8872977f668a3ab05aa1e60b7e155c # Parent ddfc1b554a08d5ba9764ec1b506d9e0eeb48df59 Added a couple of hooks for the registration form. diff -r ddfc1b554a08 -r 4629ad98ee88 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Wed Dec 31 08:40:38 2008 -0500 +++ b/plugins/SpecialUserFuncs.php Sat Jan 03 17:54:26 2009 -0500 @@ -789,8 +789,20 @@ $password = $_POST['password']; } - // CAPTCHA code was correct, create the account - // ... and check for errors returned from the crypto API + $error =& $s; + + /** + * Validation of POST data coming from registration. Put an error message in the variable $error to stop registration. + * @hook ucp_register_validate + */ + + $code = $plugins->setHook('ucp_register_validate'); + foreach ( $code as $cmd ) + { + eval($cmd); + } + + // All things verified, create account if ( !$s ) $s = $session->create_user($_POST['username'], $password, $_POST['email'], $_POST['real_name'], $coppa); } @@ -925,10 +937,25 @@ get('user_reg_msg_realname_optional'); ?>