You are here

function security_review_check_name_passwords_help in Security Review 7

Same name and namespace in other branches
  1. 6 security_review.help.inc \security_review_check_name_passwords_help()

File

./security_review.help.inc, line 335
Main help definition.

Code

function security_review_check_name_passwords_help($check = NULL, $skipped_message = NULL) {
  $element['title'] = t('Username as password');
  $element['descriptions'][] = t("Users with elevated access on the site (trusted users) who have a their account password the same as their username. It is recommended you enforce a password strength policy to avoid an attacker easily gaining access to your site.");
  if (!empty($skipped_message)) {
    $element['findings']['descriptions'][] = $skipped_message;
  }
  elseif ($check && $check['result'] == FALSE) {
    $element['findings']['descriptions'][] = t('The following users have extremely weak passwords. The links go to the edit page.');
    foreach ($check['value'] as $uid => $name) {
      $element['findings']['items'][] = array(
        'html' => l($name, 'user/' . $uid . '/edit'),
        'safe' => check_plain($name),
        'raw' => $name,
      );
    }

    //$element['findings']['pager'] = theme('pager', NULL, 20);
  }
  return $element;
}