PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Identity

The digest authentication adapter returns a Zend_Auth_Result object, which has been populated with the identity as an array having keys of realm and username. The respective array values associated with these keys correspond to the values set before authenticate() is called.

<?php
$adapter 
= new Zend_Auth_Adapter_Digest($filename,
                                        
$realm,
                                        
$username,
                                        
$password);

$result $adapter->authenticate();

$identity $result->getIdentity();

print_r($identity);

/*
Array
(
    [realm] => Some Realm
    [username] => someUser
)
*/

Zend Framework