I also try to create a simple user plugin, I created a function which can be called before the user registration.
Yes, it works, great!
The code is like:
$_PLUGINS->registerFunction( 'onBeforeUserRegistration', 'test');
function test($user, $success) {
if($user->name == 'reserveredname')
echo ('You are not allowed to use this name');
return false;
}
return true;
}
This function will don't allow the user to use the reserverdname, it will reports the information when it happens.
But I found that the user still registered OK.
Anyone could plese help me how to not let the registeration go on in this situation?