I am looking to load a field from a user's profile that is being viewed.For example, I am looking at another users profile and it will load their associated field.
I am programmatically adding a picture to the tpl (probably should be template.php) and then I am adding it to the background-image of a div. My code loads the user but then switches the user to user being viewed. It is obviously not good to be able to switch users.
Here is my code:
<?php $user = user_load(arg(1)); $picture = field_get_items('user', $user, 'field_picture'); $file = $picture['filename']; $url = $base_url . '/files/' . $file; <?
I cannot find a secure way to do this. Anyone have an idea?
Thank you for your time.