MyBB Community Forums

Full Version: A question about MyBB globals
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to set values when using MyBB globals? For example, if I were to write
$mybb->user['username'] = 'foo';
would that work?
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.