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

Immediate Check

In some cases, an application need only check if a user is already logged in to a trusted OpenID server without any interaction with the user. The Zend_OpenId_Consumer::check method does precisely that. It is executed with the same arguments as Zend_OpenId_Consumer::login, but it doesn't display any OpenID server pages to the user. From the users point of view this process is transparent, and it appears as though they never left the site. The third step succeeds if the user is already logged in and trusted by the site, otherwise it will fail.

Example 645. Immediate Check without Interaction

= new Zend_OpenId_Consumer();
if (!
$consumer->check($_POST['openid_identifier'], 'example-4_3.php')) {
"OpenID login failed.");

This example implements only the second step of authentication; the first and third steps are similar to the examples above.

Zend Framework