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'); ?>