mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
N°2311 - authent-cas compatibility with 2.6 configuration
This commit is contained in:
@@ -232,7 +232,7 @@ class CASUserProvisioning
|
||||
$bFound = false;
|
||||
if (!empty($sCASMemberships))
|
||||
{
|
||||
$sCASMemberOfName = Config::Get('cas_memberof_attribute_name');
|
||||
$sCASMemberOfName = Config::Get('cas_memberof_attribute_name', 'memberOf');
|
||||
if (phpCAS::hasAttribute($sCASMemberOfName))
|
||||
{
|
||||
// A list of groups is specified, the user must a be member of (at least) one of them to pass
|
||||
@@ -341,7 +341,7 @@ class CASUserProvisioning
|
||||
public static function UpdateUser(User $oUser)
|
||||
{
|
||||
$bCASUpdateProfiles = Config::Get('cas_update_profiles');
|
||||
$sCASMemberOfName = Config::Get('cas_memberof_attribute_name');
|
||||
$sCASMemberOfName = Config::Get('cas_memberof_attribute_name', 'memberOf');
|
||||
if ($bCASUpdateProfiles && (phpCAS::hasAttribute($sCASMemberOfName)))
|
||||
{
|
||||
$aMemberOf = phpCAS::getAttribute($sCASMemberOfName);
|
||||
|
||||
@@ -20,13 +20,17 @@ class Config
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function Get($sName)
|
||||
public static function Get($sName, $sDefaultValue = '')
|
||||
{
|
||||
$sValue = MetaModel::GetModuleSetting('authent-cas', $sName, '');
|
||||
if (empty($sValue))
|
||||
{
|
||||
$sValue = MetaModel::GetConfig()->Get($sName);
|
||||
}
|
||||
if (empty($sValue))
|
||||
{
|
||||
return $sDefaultValue;
|
||||
}
|
||||
|
||||
return $sValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user