Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getAmbiguityIdentity example
public
function
authenticate
(
)
{
$this
->
_authenticateSetup
(
)
;
$dbSelect
=
$this
->
_authenticateCreateSelect
(
)
;
$resultIdentities
=
$this
->
_authenticateQuerySelect
(
$dbSelect
)
;
if
(
(
$authResult
=
$this
->
_authenticateValidateResultSet
(
$resultIdentities
)
)
instanceof Zend_Auth_Result
)
{
return
$authResult
;
}
if
(
$this
->
getAmbiguityIdentity
(
)
=== true
)
{
$validIdentities
=
[
]
;
$zendAuthCredentialMatchColumn
=
$this
->_zendDb->
foldCase
(
'zend_auth_credential_match'
)
;
foreach
(
$resultIdentities
as
$identity
)
{
if
(
(int)
$identity
[
$zendAuthCredentialMatchColumn
]
=== 1
)
{
$validIdentities
[
]
=
$identity
;
}
}
$resultIdentities
=
$validIdentities
;
}
$authResult
=
$this
->
_authenticateValidateResult
(
array_shift
(
$resultIdentities
)
)
;