validateShowAllPendingOption() public static method

public static validateShowAllPendingOption ( )
Ejemplo n.º 1
0
<?php

$tpl = erLhcoreClassTemplate::getInstance('lhuser/account.tpl.php');
$currentUser = erLhcoreClassUser::instance();
$UserData = $currentUser->getUserData();
$tpl->set('tab', $Params['user_parameters_unordered']['tab'] == 'canned' ? 'tab_canned' : '');
if (erLhcoreClassUser::instance()->hasAccessTo('lhuser', 'allowtochoosependingmode') && isset($_POST['UpdatePending_account'])) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('user/account');
        exit;
    }
    $showAllPending = erLhcoreClassUserValidator::validateShowAllPendingOption();
    erLhcoreClassModelUserSetting::setSetting('show_all_pending', $showAllPending);
    $tpl->set('account_updated', 'done');
    $tpl->set('tab', 'tab_pending');
}
if (erLhcoreClassUser::instance()->hasAccessTo('lhspeech', 'changedefaultlanguage') && isset($_POST['UpdateSpeech_account'])) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('user/account');
        exit;
    }
    $validateSpeechData = erLhcoreClassUserValidator::validateSpeech();
    erLhcoreClassModelUserSetting::setSetting('speech_language', $validateSpeechData['speech_language']);
    erLhcoreClassModelUserSetting::setSetting('speech_dialect', $validateSpeechData['speech_dialect']);
    $tpl->set('account_updated', 'done');
    $tpl->set('tab', 'tab_speech');
}
if (erLhcoreClassUser::instance()->hasAccessTo('lhuser', 'change_visibility_list') && isset($_POST['UpdateTabsSettings_account'])) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('user/account');
        exit;