phpCAS::setLang PHP Method

setLang() public static method

This method is used to set the language used by phpCAS.
public static setLang ( string $lang ) : void
$lang string string representing the language.
return void
    public static function setLang($lang)
    {
        phpCAS::_validateClientExists();
        try {
            self::$_PHPCAS_CLIENT->setLang($lang);
        } catch (Exception $e) {
            phpCAS::error(get_class($e) . ': ' . $e->getMessage());
        }
    }

Usage Example

Ejemplo n.º 1
0
function authCAS($config)
{
    require_once dirname(__FILE__) . '/CAS/CAS.php';
    // get module configuration
    $cas_validate = true;
    $cas_version = CAS_VERSION_2_0;
    $cas_language = 'english';
    //    phpCAS::setDebug();
    phpCAS::client($cas_version, $config->cashostname, (int) $config->casport, $config->casbaseuri, false);
    phpCAS::setLang($cas_language);
    error_log("CAS: Entering");
    $check = phpCAS::isSessionAuthenticated();
    phpCAS::forceAuthentication();
    $NetUsername = phpCAS::getUser();
    //this stores their network user id
    error_log("CAS: Exiting {$NetUsername}");
    return $NetUsername;
}
All Usage Examples Of phpCAS::setLang