Example #1
0
}
$redirectUriPlain = urldecode($_SESSION['ref_uri']);
if ($hash = __paramInit('string', 'hash', 'hash')) {
    if (in_array($_user_action, array('add_vacancy', 'add_project'))) {
        $kind = $_user_action == 'add_vacancy' ? 4 : 1;
        $redirectUriPlain = '/public/?step=1&kind=' . $kind;
    }
    if (strpos($redirectUriPlain, 'hash=') === false) {
        $redirectUriPlain .= (strpos($redirectUriPlain, '?') === false ? '?' : '&') . 'hash=' . $hash;
    }
}
$redirectUri = urlencode($redirectUriPlain);
$action = __paramInit('string', null, 'action');
$registration = new registration();
$registration->listenerAction($action);
$action = $registration->getNextAction();
if ($requestedRole == "empl") {
    $registration->role = registration::ROLE_EMPLOYER;
}
if (__paramInit('string', null, 'action') != 'registration' || $registration->error['captcha'] && __paramInit('string', null, 'action') == 'registration') {
    unset($_SESSION['reg_captcha_num']);
    $registration->setFieldInfo('captchanum', uniqid('', true));
    $captcha = new captcha($registration->captchanum);
    $captcha->setNumber();
} else {
    $registration->setFieldInfo('captchanum', $_SESSION['reg_captcha_num']);
    $captcha = new captcha($registration->captchanum);
}
unset($_SESSION['login_generated']);
// Пользовательское сообщение (Alert)
$alert_message = '';