function fbconnect_get_user_info in Facebook Connect 7.2
Same name and namespace in other branches
- 8.2 fbconnect.module \fbconnect_get_user_info()
- 6.2 fbconnect.module \fbconnect_get_user_info()
Query information from Facebook user table.
Return value
array
4 calls to fbconnect_get_user_info()
- fbconnect_login_add_user_afterlogin_submit in fbconnect_login/
fbconnect_login.module - Add the user to the fbconnect_users table if they logged in with Facebook
- fbconnect_login_authorize_page in fbconnect_login/
fbconnect_login.pages.inc - Menu callback. Called when user perform Facebook registration
- fbconnect_login_autoconnect_form_submit in fbconnect_login/
fbconnect_login.module - Submit handler for autoconnect form.
- fbconnect_login_login_page in fbconnect_login/
fbconnect_login.pages.inc - Menu callback. Logs user into site or redirects.
File
- ./
fbconnect.module, line 444 - Facebook Connect API module.
Code
function fbconnect_get_user_info($fields = array(), $fbuid = NULL) {
$params = array();
if (!$fbuid) {
$fbuid = fbconnect_get_fbuid();
}
if (is_array($fields) && count($fields)) {
$params['fields'] = join(', ', $fields);
}
elseif ($fields) {
$params['fields'] = $fields;
}
if ($fbuid) {
return fbconnect_graph_query("/" . $fbuid, $params)
->asArray();
}
}