Great module, very helpful. Thanks.

I have made a simple change in theme_cmf_user() which I would like you to consider. If the current user does not have access to view user profiles then the Author column should just have plain text and not a link, otherwise you encourage the user to click, and it just produces a 403 Access Denied. This is also what is done is theme_username().

The code before is:

  $url = $url_alias ? $url_alias : 'user/'. $uid;
  if ($user['status']) {
    $output .= l($user['name'], $url, array());
  }
  else {
    $output .= l(_cmf_get_img('blocked', t('blocked')) .' '. $user['name'], $url, array('html' => TRUE));
  }

which becomes:

  $display = $user['status'] ? $user['name'] : _cmf_get_img('blocked', t('blocked')) .' '. $user['name'];
  if (user_access('access user profiles')) {
    $url = $url_alias ? $url_alias : 'user/'. $uid;
    $output = l($display, $url, array('html' => TRUE));
  }
  else {
    $output = $display;
  }

I will make a patch for this, so that anyone can test it out.
Cheers
Jonathan

Comments

jonathan1055’s picture

Here is the patch against 2.x-dev.

jonathan1055’s picture

Status: Active » Needs review

Set status to 'needs review'. Thanks

irakli’s picture

Status: Needs review » Closed (fixed)
jonathan1055’s picture

Status: Closed (fixed) » Fixed

Excellent.
Status back to 'fixed' so it shows for two weeks in the queue and on dashboard, etc.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.