function lingotek_setup_account_settings_form_submit in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.2 lingotek.setup.inc \lingotek_setup_account_settings_form_submit()
- 7.3 lingotek.setup.inc \lingotek_setup_account_settings_form_submit()
- 7.4 lingotek.setup.inc \lingotek_setup_account_settings_form_submit()
- 7.5 lingotek.setup.inc \lingotek_setup_account_settings_form_submit()
- 7.6 lingotek.setup.inc \lingotek_setup_account_settings_form_submit()
Account Settings (for Current Users) - Form Processing
File
- ./
lingotek.setup.inc, line 288
Code
function lingotek_setup_account_settings_form_submit($form, $form_state) {
$login_id = $form_state['values']['lingotek_lid'];
$password = $form_state['values']['lingotek_pid'];
// Validate the Account
list($success, $msg) = lingotek_list_community_integrations($login_id, $password);
if ($success == FALSE) {
drupal_set_message(check_plain($msg), 'error');
}
else {
// Login Successful: Valid Account
$_SESSION['lingotek_setup_path'] = array(
LINGOTEK_MENU_LANG_BASE_URL . '/account-settings',
);
drupal_set_message(t('Your account settings have been saved.'));
variable_set('lingotek_login_id', $login_id);
variable_set('lingotek_password', $password);
drupal_goto(LINGOTEK_MENU_LANG_BASE_URL . '/community-select');
}
// END: Valid Login
}