Variables

User variables in D7

Submitted by shiv on Mon, 01/04/2016 - 12:07

Getting node author of current viewed node

<?php $node = node_load(arg(1));
echo $node->uid; ?>

Current login User.

Subscribe to Variables

Sample blackbox block

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas non porta odio, id mattis erat.

Nam sed tincidunt eros. Donec a venenatis odio, vitae commodo sem. Vivamus ullamcorper pellentesque erat, in adipiscing tortor scelerisque sit amet. Nulla pulvinar urna magna. Vivamus a ipsum lorem. Etiam adipiscing pulvinar lorem.