function bakery_profile_pull_form_submit in Bakery Single Sign-On System 7.4
If the request succeeds, go to the user page. Otherwise, show an error.
File
- ./
bakery_profile.module, line 415
Code
function bakery_profile_pull_form_submit($form, &$form_state) {
$result = bakery_profile_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;
}
}