diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-17 18:56:25 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-17 18:56:25 +0000 |
commit | 4b84de9a0c5bc8a9a3cb781b423d9ce834ea089b (patch) | |
tree | cd5b7cc5df2f5c7e73bd9428514b789589051e5c /modules/contact.module | |
parent | 5db4a65da38b7c391bdbd35a841ca9f5272f57ea (diff) | |
download | brdo-4b84de9a0c5bc8a9a3cb781b423d9ce834ea089b.tar.gz brdo-4b84de9a0c5bc8a9a3cb781b423d9ce834ea089b.tar.bz2 |
#14591, User.module links for blocked/non-existant accounts + menu 403/404 issue, patch by Steven and merlinofchaos
Diffstat (limited to 'modules/contact.module')
-rw-r--r-- | modules/contact.module | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/contact.module b/modules/contact.module index ea1f116ab..eadeb2a8d 100644 --- a/modules/contact.module +++ b/modules/contact.module @@ -320,8 +320,12 @@ function contact_admin_settings_submit($form_id, $form_values) { function contact_mail_user() { global $user; - if ($account = user_load(array('uid' => arg(1), 'status' => 1))) { - if (!$account->contact && !user_access('administer users')) { + if ($account = user_load(array('uid' => arg(1)))) { + $admin_access = user_access('administer users'); + if (!$account->status && !$admin_access) { + drupal_access_denied(); + } + else if (!$account->contact && !$admin_access) { $output = t('%name is not accepting e-mails.', array('%name' => $account->name)); } else if (!$user->uid) { |