MyBB Community Forums
[General] {$mybb->user['avatar']} - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [General] {$mybb->user['avatar']} (/thread-129601.html)

Pages: 1 2


{$mybb->user['avatar']} - NNT_ - 2012-11-18

Hi,

I've a question :

Where I can change the path for this variable {$mybb->user['avatar']}?


RE: {$mybb->user['avatar']} - Omar G. - 2012-11-18

It is the path to the avatar of the current connected user (you). Edit your avatar to change it.


RE: {$mybb->user['avatar']} - NNT_ - 2012-11-18

(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


RE: {$mybb->user['avatar']} - Omar G. - 2012-11-18

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


RE: {$mybb->user['avatar']} - NNT_ - 2012-11-19

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.


RE: {$mybb->user['avatar']} - Omar G. - 2012-11-19

See load_user() from the in FORUM/inc/class_session.php .


RE: {$mybb->user['avatar']} - NNT_ - 2012-11-20

(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


RE: {$mybb->user['avatar']} - Vernier - 2012-11-20

(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


RE: {$mybb->user['avatar']} - NNT_ - 2012-11-20

(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']}.


RE: {$mybb->user['avatar']} - Omar G. - 2012-11-21

(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 ).