2012-05-16, 04:03 PM
*******************
***** SOLVED *******
*******************
The Full working Plugin is at Post #3 in
http://community.mybb.com/thread-118887.html
Enjoy
how would I go about thowing an error to the system to stop the signup I tried to call
using die() I traced the logic it works out the way it should but the error is not stopping the signup process.
here is the php
going over the member.php file I see that
Any help would be great, Thanks.
***** SOLVED *******
*******************
The Full working Plugin is at Post #3 in
http://community.mybb.com/thread-118887.html
Enjoy
how would I go about thowing an error to the system to stop the signup I tried to call
$error[] = "some text";
&&
error($lang->error_spam_deny);
like the lines below the hook dose (line 82 of members.php) but it dose not seem to stop the process, if you can help or point me to a post (I search but was not able to find). using die() I traced the logic it works out the way it should but the error is not stopping the signup process.
here is the php
function check_user_in_game_name()
{
GLOBAL $mybb;
$check_user_in_game_DB_location = "xxxx";
$check_user_in_game_DB_user_name = "xxx";
$check_user_in_game_DB_user_pass = "xxxx";
$check_user_in_game_DB_name = "xxx";
$check_user_in_game_DB_table = "xxx";
$conUserName = mysql_connect($check_user_in_game_DB_location,$check_user_in_game_DB_user_name,$check_user_in_game_DB_user_pass)or die("error 1");
mysql_select_db($check_user_in_game_DB_name, $conUserName);
$checkUserNameCall = "SELECT playername FROM `".$check_user_in_game_DB_table."` WHERE playername = '".mysql_real_escape_string($mybb->input['username'])."' LIMIT 1";
$checkUserNameResult = mysql_query($checkUserNameCall,$conUserName)or die("error 2 ".mysql_error());// $errors[] = "Oh, snap! Something went wrong if HordeCraft Member. dang!";
if($checkUserNameResult && mysql_num_rows($checkUserNameResult) > 0)
{
mysql_close($conUserName);
error($lang->error_spam_deny);
$errors[] = "Not A HordeCraft Member.";
return false;
} elseif(!$checkUserNameResult){
error($lang->error_spam_deny);
$errors[] = "Unable to check your players Status. Please contant an site admin.";
return false;
}
mysql_close($conUserName);
return true;
}
going over the member.php file I see that
$error
is set to null after the hook is called is its out but I don't see a way to kill the signup in member.php Any help would be great, Thanks.