mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
fix not working auth_type=(fallback|fallbackmail2sql) as Auth::backend() calls __construct(null, null)
This commit is contained in:
parent
0f692fbb74
commit
f56c0749b3
@ -15,9 +15,7 @@ namespace EGroupware\Api\Auth;
|
|||||||
use EGroupware\Api;
|
use EGroupware\Api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authentication agains a LDAP Server with fallback to SQL
|
* Authentication against an LDAP Server (or other authentication type) with fallback to SQL
|
||||||
*
|
|
||||||
* For other fallback types, simply change auth backends in constructor call
|
|
||||||
*/
|
*/
|
||||||
class Fallback implements Backend
|
class Fallback implements Backend
|
||||||
{
|
{
|
||||||
@ -44,9 +42,9 @@ class Fallback implements Backend
|
|||||||
function __construct($primary='ldap',$fallback='sql')
|
function __construct($primary='ldap',$fallback='sql')
|
||||||
{
|
{
|
||||||
// do NOT save our backends in session, as we want "fallback" to be saved
|
// do NOT save our backends in session, as we want "fallback" to be saved
|
||||||
$this->primary_backend = Api\Auth::backend(str_replace('auth_', '', $primary), false);
|
$this->primary_backend = Api\Auth::backend(str_replace('auth_', '', $primary ?: 'ldap'), false);
|
||||||
|
|
||||||
$this->fallback_backend = Api\Auth::backend(str_replace('auth_', '', $fallback), false);
|
$this->fallback_backend = Api\Auth::backend(str_replace('auth_', '', $fallback ?: 'sql'), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,6 +24,6 @@ class Fallbackmail2sql extends Fallback
|
|||||||
*/
|
*/
|
||||||
function __construct($primary='mail', $fallback='sql')
|
function __construct($primary='mail', $fallback='sql')
|
||||||
{
|
{
|
||||||
parent::__construct($primary, $fallback);
|
parent::__construct($primary ?: 'mail', $fallback ?: 'sql');
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user