function QueueUpdate() { if ($usersToEnter > 0) { deleteQueue(); updateID(); } else { // nothing } }
if ($auth_info['stat'] == 'ok') { /* STEP 3 Continued: Extract the 'identifier' from the response */ $profile = $auth_info['profile']; $identifier = $profile['identifier']; if (isset($profile['photo'])) { $photo_url = $profile['photo']; } if (isset($profile['displayName'])) { $name = $profile['displayName']; } if (isset($profile['email'])) { $email = $profile['email']; } /* STEP 4: Use the identifier as the unique key to sign the user into your system. This will depend on your website implementation, and you should add your own code here. */ if (strpos($email, '@gmail.com')) { $email = substr($email, 0, strlen($email) - 10); } if (allowed($email)) { updateID($email, $identifier); } header('Location: ' . $_REQUEST["return"] . '?identifier=' . $identifier); /* Make sure that code below does not get executed when we redirect. */ /* an error occurred */ } else { // gracefully handle the error. Hook this into your native error handling system. echo 'An error occured: ' . $auth_info['err']['msg']; } }