Пример #1
0
function w2PgetUsername($username)
{
    return CContact::getContactByUsername($username);
}
function w2PgetUsername($username)
{
    trigger_error("w2PgetUsername() has been deprecated in v3.1 and will be removed by v5.0. Please use CContact::getContactByUsername() instead.", E_USER_NOTICE);
    return CContact::getContactByUsername($username);
}
Пример #3
0
    } else {
        echo "<script language='javascript'>\n            alert('Error: You didn\\'t provide the correct Anti Spam Security ID or all required data. Please try again.');\n            history.go(-1);\n\t        </script>";
        exit;
    }
} else {
    echo "\n          <script language='javascript'>\n                alert('Error: You didn\\'t provide the Anti Spam Security ID. Please try again.');\n                history.go(-1);\n          </script>\n         ";
    exit;
}
if (!isset($GLOBALS['OS_WIN'])) {
    $GLOBALS['OS_WIN'] = stristr(PHP_OS, 'WIN') !== false;
}
if (w2PgetConfig('activate_external_user_creation') != 'true') {
    die('You should not access this file directly');
}
$username = w2PgetParam($_POST, 'user_username', 0);
$contactListByUsername = CContact::getContactByUsername($username);
if ($contactListByUsername != 'User Not Found') {
    error_reporting(0);
    echo "<script language='javascript'>\n          alert('The username you selected already exists, please select another or if that user name is yours request the password recovery through the dedicated link.');\n          history.go(-2);\n        </script>";
    die;
}
$email = w2PgetParam($_POST, 'contact_email', 0);
$contactListByEmail = CContact::getContactByEmail($email);
if ($contactListByEmail != 'User Not Found') {
    error_reporting(0);
    echo "<script language='javascript'>\n          alert('The email you selected already exists, please select another or if that email is yours request the password recovery through the dedicated link.');\n          history.go(-2);\n        </script>";
    die;
}
$user = new CUser();
if (!$user->bind($_POST)) {
    $AppUI->setMsg($user->getError(), UI_MSG_ERROR);