function fbconnect_login_register_form_validate in Facebook Connect 8.2
Same name and namespace in other branches
- 7.2 fbconnect_login/fbconnect_login.pages.inc \fbconnect_login_register_form_validate()
User logged in state validate handler
_state
Parameters
$form:
1 string reference to 'fbconnect_login_register_form_validate'
- fbconnect_login_authorize_page in fbconnect_login/
fbconnect_login.pages.inc - Menu callback. Called when user perform Facebook registration
File
- fbconnect_login/
fbconnect_login.pages.inc, line 243 - User pages callbacks for the fbconnect module.
Code
function fbconnect_login_register_form_validate($form, &$form_state) {
$fbuid = fbconnect_get_fbuid();
// Make sure we have a Facebook user object by the time we get here otherwise
// drop form and exit with error message.
if ($fbuid == 0) {
drupal_set_message(t('You are not logged into Facebook. Log into Facebook and try again.'), 'error');
drupal_goto();
}
}