You are here

function privatemsg_configure_validate in Privatemsg 5.3

Same name and namespace in other branches
  1. 5 privatemsg.module \privatemsg_configure_validate()

File

./privatemsg.module, line 659

Code

function privatemsg_configure_validate($form_id, $form_values, $form) {
  if (!empty($form_values['privatemsg_welcome_sender'])) {
    $sender = user_load(array(
      'name' => $form_values['privatemsg_welcome_sender'],
    ));
    if ($sender->uid) {
      form_set_value($form['welcome']['privatemsg_welcome_sender'], $sender->uid);
    }
    else {
      form_set_error('privatemsg_welcome_sender', t('The <em>Sender</em> does not exist.'));
    }
  }
}