drupal show/hide certain fields based on author
I would like to show / hide certain fields in my Drupal view based on whether the current user is the author of the node being viewed.
I installed the Views Custom Field module which seems to allow this, but I have no knowledge of PHP,开发者_StackOverflow社区 so wondered if anyone could help me with the PHP code.
Something like this (check that $data has uid, maybe different name):
global $user;
if ($user->uid == $data->uid) {
print 'something';
}
精彩评论