diff --git a/realname.install b/realname.install index 926f0f0..0dcaf56 100644 --- a/realname.install +++ b/realname.install @@ -55,24 +55,24 @@ function realname_requirements($phase) { $requirements['user_mail_register_admin_created_body'] = array( 'title' => t('E-mail: "Welcome (new user created by administrator)" template'), 'value' => t('Not configured'), - 'severity' => REQUIREMENT_ERROR, - 'description' => t('Replace the token [user:name] with [user:name-raw] in e-mail template.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-admin-created')))), + 'severity' => REQUIREMENT_WARNING, + 'description' => t('Replace the token [user:name] with [user:name-raw] in e-mail template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-admin-created')))), ); } if (!strpos(variable_get('user_mail_register_no_approval_required_body', FALSE), '[user:name-raw]')) { $requirements['user_mail_register_no_approval_required_body'] = array( 'title' => t('E-mail: "Welcome (no approval required)" template'), 'value' => t('Not configured'), - 'severity' => REQUIREMENT_ERROR, - 'description' => t('Replace the token [user:name] with [user:name-raw] in e-mail template.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-no-approval-required')))), + 'severity' => REQUIREMENT_WARNING, + 'description' => t('Replace the token [user:name] with [user:name-raw] in e-mail template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-no-approval-required')))), ); } if (!strpos(variable_get('user_mail_status_activated_body', FALSE), '[user:name-raw]')) { $requirements['user_mail_status_activated_body'] = array( 'title' => t('E-mail: "Account activation" template'), 'value' => t('Not configured'), - 'severity' => REQUIREMENT_ERROR, - 'description' => t('Replace the token [user:name] with [user:name-raw] in e-mail template.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-activated')))), + 'severity' => REQUIREMENT_WARNING, + 'description' => t('Replace the token [user:name] with [user:name-raw] in e-mail template, if using username for login.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-activated')))), ); } } diff --git a/realname.module b/realname.module index e21a1cd..6a5c371 100644 --- a/realname.module +++ b/realname.module @@ -431,7 +431,7 @@ function realname_username_raw_token_validate(&$element, &$form_state) { $value = isset($element['#value']) ? $element['#value'] : $element['#default_value']; if (!strpos($value, '[user:name-raw]')) { - form_error($element, t('The %element-title does not contain [user:name-raw] token.', array('%element-title' => $element['#title']))); + drupal_set_message(t('The %element-title does not contain the [user:name-raw] token, which is necessary when using username for login when the Real Name module is enabled.', array('%element-title' => $element['#title'])), 'warning'); } return $element;