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
Comment #1
jonathan1055 commentedHere is the patch against 2.x-dev.
Comment #2
jonathan1055 commentedSet status to 'needs review'. Thanks
Comment #3
irakli commentedcommitted: http://drupalcode.org/project/cmf.git/commit/9550418
Thank you
Comment #4
jonathan1055 commentedExcellent.
Status back to 'fixed' so it shows for two weeks in the queue and on dashboard, etc.