2009-09-10, 10:38 PM
Pages: 1 2
2009-09-11, 07:37 AM
I've seen that else if cause havoc in some places...
The best method (or easiest) is to do:
Then you're good to go. You can use $mybb, $db, $lang etc. anywhere. For less specifics, you can just include ./inc/init.php.
(2009-09-08, 02:39 PM)AMEAR Wrote: [ -> ]Where is this $mybb class? where Defined it?
The best method (or easiest) is to do:
define("IN_MYBB", 1);
require_once './global.php';
if($mybb->user['uid'])
{
// Is a User.
}
Then you're good to go. You can use $mybb, $db, $lang etc. anywhere. For less specifics, you can just include ./inc/init.php.
2009-09-11, 11:15 AM
dear Tomm M!
$mybb->user['uid'] how can specify uid? how set uid?
$mybb->user['uid'] how can specify uid? how set uid?
2009-09-11, 12:38 PM
$mybb->user['uid'] contains the uid of the current user. 'uid' is a field in the users table. You don't set it because that's done when someone registers.
2009-09-11, 12:55 PM
...or logs in...
2009-09-11, 12:59 PM
No, but I mean the 'uid' field is filled with an id when someone registers.
The uid is always the same.
You misunderstood me
The uid is always the same.
You misunderstood me
2009-09-11, 01:28 PM
...meh - I meant it's set from 0 to 8582 when you log in here...
2009-09-12, 02:44 PM
(2009-09-11, 07:37 AM)Tomm M Wrote: [ -> ]I've seen that else if cause havoc in some places...Its ok thx
(2009-09-08, 02:39 PM)AMEAR Wrote: [ -> ]Where is this $mybb class? where Defined it?
The best method (or easiest) is to do:
define("IN_MYBB", 1); require_once './global.php'; if($mybb->user['uid']) { // Is a User. }
Then you're good to go. You can use $mybb, $db, $lang etc. anywhere. For less specifics, you can just include ./inc/init.php.
but... how can set it, when user loging in?
excuse me i dont know more things about mybb system
2009-09-12, 08:37 PM
As I said, the 'uid' field is created on sign up, it never changes. You don't set it, it is a unique identification number
Pages: 1 2