function realname_requirements in Real Name 7
Implements hook_requirements().
File
- ./
realname.install, line 55 - Installation file for Realname module.
Code
function realname_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
if (!variable_get('realname_suppress_user_name_mail_validation', FALSE) && strpos(variable_get('user_mail_register_admin_created_body', FALSE), '[user:name-raw]') === FALSE) {
$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_WARNING,
'description' => $t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array(
'@people' => url('admin/config/people/accounts', array(
'fragment' => 'edit-email-admin-created',
)),
)),
);
}
if (!variable_get('realname_suppress_user_name_mail_validation', FALSE) && strpos(variable_get('user_mail_register_no_approval_required_body', FALSE), '[user:name-raw]') === FALSE) {
$requirements['user_mail_register_no_approval_required_body'] = array(
'title' => $t('E-mail: "Welcome (no approval required)" template'),
'value' => $t('Not configured'),
'severity' => REQUIREMENT_WARNING,
'description' => $t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array(
'@people' => url('admin/config/people/accounts', array(
'fragment' => 'edit-email-no-approval-required',
)),
)),
);
}
if (!variable_get('realname_suppress_user_name_mail_validation', FALSE) && strpos(variable_get('user_mail_status_activated_body', FALSE), '[user:name-raw]') === FALSE) {
$requirements['user_mail_status_activated_body'] = array(
'title' => $t('E-mail: "Account activation" template'),
'value' => $t('Not configured'),
'severity' => REQUIREMENT_WARNING,
'description' => $t('Replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in <a href="@people">e-mail</a> template, if using username for login.', array(
'@people' => url('admin/config/people/accounts', array(
'fragment' => 'edit-email-activated',
)),
)),
);
}
}
return $requirements;
}