
Tutu Valentin - 2006-03-02 12:47:25
for the ones who want to know how to login with a phpbb administrator account:
#### the class file: #####
1) ###########
change this line:
function login($phpbb_user_id) {
with this line:
function login($phpbb_user_id, $isAdmin = 0) {
2) #########
change this line:
return session_begin($phpbb_user_id, $user_ip, PAGE_INDEX, FALSE, TRUE);
with this line:
return session_begin($phpbb_user_id, $user_ip, PAGE_INDEX, FALSE, TRUE, $isAdmin);
#### the login file: #####
1) #######
change this line:
$phpbb->login( $user->id );
with this line:
$phpbb->login( $user->id, $user->isAdmin);
remember that $user object is not part of phpBB, it's something that you have to make. $user->id is the id of the user in the database, $user->isAdmin is true only when the value of user_level is 1 (and only 1!)