hi all
i would like to login from my web site login form not phpbb login box
is there is is any function to do this .
it was my problem but i found the soluation
by the way i add user using this
public function reg_from_ci_to_phpbb($name='',$email='',$password='')
{
$user_row = array(
'username' => strip_tags($name),
'user_password' => phpbb_hash($password),
'user_email' => $email,
'group_id' => 2, // by default, the REGISTERED user group is id 2
'user_timezone' => (float) date('T'),
'user_lang' => 'ar',
'user_type' => '0',
'user_ip' => $_SERVER['REMOTE_ADDR'],
'user_regdate' => time(),
);
return user_add($user_row, $cp_data);
}
LogIn & LogOut code
function login($username, $password, $autologin, $admin)
{
// use this only for localhost!!
global $config;
$config['cookie_domain'] = 'localhost';
global $auth;
// Attempt authorization. result can be used to send messages or perform
// loggin success / fail logic.
$result = $auth->login($username, $password, $autologin, true, $admin);
}
function logout()
{
global $user;
$user->session_kill();
$user->session_begin();
}