예제 #1
0
    $AppUI->loadPrefs(0);
}
//Function register logout in user_acces_log
if (isset($user_id) && isset($_GET['logout'])) {
    $AppUI->registerLogout($user_id);
}
// check is the user needs a new password
if (w2PgetParam($_POST, 'lostpass', 0)) {
    $uistyle = w2PgetConfig('host_style');
    $AppUI->setUserLocale();
    @(include_once W2P_BASE_DIR . '/locales/' . $AppUI->user_locale . '/locales.php');
    include_once W2P_BASE_DIR . '/locales/core.php';
    setlocale(LC_TIME, $AppUI->user_lang);
    if (w2PgetParam($_POST, 'sendpass', 0)) {
        require W2P_BASE_DIR . '/includes/sendpass.php';
        sendNewPass();
    } else {
        require W2P_BASE_DIR . '/style/' . $uistyle . '/lostpass.php';
    }
    exit;
}
// check if the user is trying to log in
// Note the change to REQUEST instead of POST.  This is so that we can
// support alternative authentication methods such as the PostNuke
// and HTTP auth methods now supported.
if (isset($_POST['login'])) {
    $username = w2PgetCleanParam($_POST, 'username', '');
    $password = w2PgetCleanParam($_POST, 'password', '');
    $redirect = w2PgetCleanParam($_POST, 'redirect', '');
    $AppUI->setUserLocale();
    @(include_once W2P_BASE_DIR . '/locales/' . $AppUI->user_locale . '/locales.php');
예제 #2
0
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined('_VALID_MOS') or die('Restricted access');
global $mosConfig_frontend_login;
require_once $mainframe->getPath('front_html');
if ($mosConfig_frontend_login != NULL && ($mosConfig_frontend_login === 0 || $mosConfig_frontend_login === '0')) {
    echo _NOT_AUTH;
    return;
}
switch ($task) {
    case 'lostPassword':
        lostPassForm($option);
        break;
    case 'sendNewPass':
        sendNewPass($option);
        break;
    case 'register':
        registerForm($option, $mosConfig_useractivation);
        break;
    case 'saveRegistration':
        saveRegistration();
        break;
    case 'activate':
        activate($option);
        break;
}
function lostPassForm($option)
{
    global $mainframe;
    $mainframe->SetPageTitle(_PROMPT_PASSWORD);