function commerce_kickstart_custom_setting in Commerce Kickstart 7.2
Validate callback; Populate the admin account mail, user and password with custom values.
1 string reference to 'commerce_kickstart_custom_setting'
File
- ./
commerce_kickstart.profile, line 108
Code
function commerce_kickstart_custom_setting(&$form, &$form_state) {
$form_state['values']['account']['mail'] = $form_state['values']['site_mail'];
// Use our custom values only the corresponding checkbox is checked.
if ($form_state['values']['override_account_informations'] == TRUE) {
if ($form_state['input']['pass']['pass1'] == $form_state['input']['pass']['pass2']) {
$form_state['values']['account']['name'] = $form_state['values']['name'];
$form_state['values']['account']['pass'] = $form_state['input']['pass']['pass1'];
}
else {
form_set_error('pass', st('The specified passwords do not match.'));
}
}
}