MyBB Community Forums

Full Version: {$mybb->user['avatar']}
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I've a question :

Where I can change the path for this variable {$mybb->user['avatar']}?
It is the path to the avatar of the current connected user (you). Edit your avatar to change it.
(2012-11-18, 06:47 AM)Omar G. Wrote: [ -> ]It is the path to the avatar of the current connected user (you). Edit your avatar to change it.

Yes, I know that. The path is ./upload/avatar/xxxx

But I want to know where (php file) I could edit above path
Next time try to be more specific because we are not here to guess your question but to support you with the information you do provide us with. To change the path to where avatars are stored go to:

Administrator CP -> Configuration -> Settings -> User Registration and Profile Options -> Avatar Upload Path
First, I want to say sorry about my English. It's the reason make us have misunderstanding.

Oke, let's start over again.

I want to know which PHP FILE declare this variable : {$mybb->user['avatar']}. So I can edit on that PHP file.

Thanks you.
See load_user() from the in FORUM/inc/class_session.php .
(2012-11-19, 10:23 PM)Omar G. Wrote: [ -> ]See load_user() from the in FORUM/inc/class_session.php .

Thanks for your reply. I looking for that variable in class_session, but found nothing Sad
(2012-11-20, 01:15 PM)NNT_ Wrote: [ -> ]
(2012-11-19, 10:23 PM)Omar G. Wrote: [ -> ]See load_user() from the in FORUM/inc/class_session.php .

Thanks for your reply. I looking for that variable in class_session, but found nothing Sad

It's defined on line 110 of ./inc/class_session.php and referenced on line 73. Smile
(2012-11-20, 04:32 PM)Vernier Wrote: [ -> ]It's defined on line 110 of ./inc/class_session.php and referenced on line 73. Smile

No, I don't mean that I can't find that fuction. I mean I can't find anything relate to {$mybb->user['avatar']}.
(2012-11-20, 06:26 PM)NNT_ Wrote: [ -> ]
(2012-11-20, 04:32 PM)Vernier Wrote: [ -> ]It's defined on line 110 of ./inc/class_session.php and referenced on line 73. Smile

No, I don't mean that I can't find that fuction. I mean I can't find anything relate to {$mybb->user['avatar']}.

	function load_user($uid, $password='')
	{
		global $mybb, $db, $time, $lang, $mybbgroups, $session, $cache;

		[...]

		$uid = intval($uid);
		$query = $db->query("
			SELECT u.*, f.*
			FROM ".TABLE_PREFIX."users u 
			LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid) 
			WHERE u.uid='$uid'
			LIMIT 1
		");
		$mybb->user = $db->fetch_array($query);

		[...]

		return true;
	}

There it is ( $mybb->user ).
Pages: 1 2