MyBB Community Forums
A question about MyBB globals - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: A question about MyBB globals (/thread-102296.html)



A question about MyBB globals - Captain Lightning - 2011-08-22

Is it possible to set values when using MyBB globals? For example, if I were to write
$mybb->user['username'] = 'foo';
would that work?


RE: A question about MyBB globals - frostschutz - 2011-08-23

Depends on what you mean by "would that work". These variables are not write protected so yes you can assign values to them. But if the result of that will be what you expect, that is highly doubtful. MyBB and plugins rely on these variables having the correct, untampered values in them. Changing them might break things bad.