What is the difference between setIdentity and setCredential in Zend Framework?
$authAdapter->setIdentityColumn('username')
->setCredentialColumn('password');
$authAdapter->setIdentity($data['username'])
->setCredential($data['password']);
Please help me I need some detailed explanation.
identityColumn: This is the name of the database table column used to represent the identity. The identity column must contain unique values, such as a username or e-mail address.
credentialColumn: This is the name of the database table column used to represent the credential. Under a simple identity and password authentication scheme, the credential value corresponds to the password. See also the credentialTreatment option.
Basically, setIdentity tells the system to set a username and setCredential tells the system to set the provided password for authentication.
Hope it helps.
Ref: Zend Table