Contribution Date
Technology
Contribution Project
Contribution Details
Hi pavimal,
Instead of using global $user; print $user;
You will have to do something like this
// Global user.
global $user;
// Logged in user's user id.
$user_id = $user->uid;
// Load the user object instead. (please note that when loading the user, user variable other than $user. This is a special case.)
$user_object = user_load($user_id);
Note:
By default the global user object will contain the basic information of user's login. For ex: login time, session info e.t.c.
However if you want to access complete user object information, Then you will have to load the complete user object. This will also fetch all the fields and respective data.
Contribution Issue Link
Contribution Link
Files count
0
Patches count
0