if (isset($_GET['action']) and $_GET['action'] == 'add_user' and isset($_GET['username'])) { $query = ' SELECT id, username, mail_address FROM ' . USERS_TABLE . ' WHERE BINARY username = BINARY "' . pwg_db_real_escape_string($_GET['username']) . '" AND username NOT IN ("18","16") LIMIT 1 ;'; $data = pwg_db_fetch_assoc(pwg_query($query)); if (!empty($data)) { Synch_FluxBB_Adduser($data['id'], stripslashes($data['username']), $data['mail_address']); } Audit_PWG_FluxBB(); } else { if (isset($_GET['action']) and $_GET['action'] == 'del_user' and isset($_GET['id'])) { FluxBB_Deluser($_GET['id'], true); Audit_PWG_FluxBB(); } else { if (isset($_GET['action']) and $_GET['action'] == 'add2pwg' and isset($_GET['id']) and isset($_GET['username']) and isset($_GET['email'])) { $emails_to_create = array(); $emails_rejected = array(); $emails_already_exist = array(); $emails_created = array(); $emails_on_error = array(); $email = trim($_GET['email']); $username = $_GET['username']; $fluxbb_id = $_GET['id']; // this test requires PHP 5.2+ if (filter_var($email, FILTER_VALIDATE_EMAIL) !== false) { $emails_to_check[] = $email; if (!get_userid_by_email($email)) {
/** * Delete registered user in FluxBB user table */ function Register_FluxBB_Deluser($user_id) { FluxBB_Deluser(FluxBB_Searchuser($user_id), true); }