Project:Views Custom Field
Version:6.x-1.0
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi

I need to retrieve the $user object; the current user isn't available from the $data abject.

My need is to create an edit link beside a list of nodes that only appears if the node author is the same as the current user.

Thanks

Glenn

Comments

#1

Title:Retriece $user» Retrieve $user

#2

<?php
global $user;
print
$user->uid;
?>

#3

Status:active» fixed

Thank you bfr, this is exactly what I needed to know. Including global $user; makes the $user data available for my custom field.

And since it's almost 8 months later, I'll assume glennnz also found that this worked and take the liberty of changing the status to fixed.

#4

Status:fixed» closed (fixed)

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

nobody click here