function fb_register_all_users in Drupal for Facebook 6.2
This callback will register a chunk of users, then redirect to itself to register another chunk. And so on, to quickly register all users of a site, rather than waiting for cron jobs to take care of it all.
1 string reference to 'fb_register_all_users'
- fb_register_menu in contrib/
fb_register.module - Implementation of hook_menu().
File
- contrib/
fb_register.module, line 68 - This code aims to prevent duplicate accounts.
Code
function fb_register_all_users($fb_app, $how_many) {
$success_count = _fb_register_register_users($fb_app, $how_many);
drupal_set_message(t("%count users successfully registered.", array(
'%count' => $success_count,
)));
$output = '<p>' . _fb_register_summary($fb_app) . "</p>\n";
if ($success_count > 0) {
$output .= '<p>' . t('This page will refresh, to register another batch of users...') . '</p>';
drupal_set_html_head('<meta http-equiv="refresh" content="3" />');
}
elseif ($success_count < 0) {
$output .= '<p>' . t('Encountered an error. Not refreshing page.') . "</p>\n";
}
return $output;
}