function bakery_pull_form_submit in Bakery Single Sign-On System 7.2
Same name and namespace in other branches
- 6.2 bakery.module \bakery_pull_form_submit()
- 7.3 bakery.pages.inc \bakery_pull_form_submit()
If the request succeeds, go to the user page. Otherwise, show an error.
File
- ./
bakery.module, line 2009 - Module file for the Bakery.
Code
function bakery_pull_form_submit($form, &$form_state) {
$result = bakery_request_account($form_state['values']['name'], $form_state['values']['or_email']);
if ($result === FALSE) {
drupal_set_message(t("Pulling account %name failed: maybe there is a typo or they don't exist on the master site.", array(
'%name' => $form_state['values']['name'],
)), 'error');
}
else {
$form_state['redirect'] = 'user/' . $result;
}
}