PHP Classes

phpbb login of administrator

Recommend this page to a friend!

      PHPBB Login Integration  >  All threads  >  phpbb login of administrator  >  (Un) Subscribe thread alerts  
Subject:phpbb login of administrator
Summary:the way to do it :)
Messages:1
Author:Tutu Valentin
Date:2006-03-02 12:47:25
 

 


  1. phpbb login of administrator   Reply   Report abuse  
Picture of Tutu Valentin 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!)

 
For more information send a message to info at phpclasses dot org.