Member_2_5230414
asked on
how to call a class properly
How would i call the following class??
<?php
class vBulletinUser{
public static function login($username, $remember_me = false){
chdir(VB_ROOT_PATH);
require_once('./global.php');
require_once(DIR . '/includes/functions_login.php');
global $vbulletin,$vbphrase;
$remember_me = $remember_me ? true : false; //force to true or false value
$vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, infractiongroupids,
username, password, salt FROM ".TABLE_PREFIX."user WHERE username = '".
$vbulletin->db->escape_string(htmlspecialchars_uni($username))."'");
if ($vbulletin->userinfo){
process_new_login($vbulletin->GPC['logintype'], $remember_me, $vbulletin->GPC['cssprefs']);
exec_shut_down();
return true;
}
return false;
}
}
new vBulletinUser();
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
seems like there are different meanings to the word "properly"...
You call it like this:
Open in new window