The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Can anyone provide a simple example of checking the usergroup and post count of $_POST['username'] and $_POST['password'].
|
|
#2
|
||||
|
||||
|
Have to tried looking at the login.php page or the functions_login.php page?
|
|
#3
|
|||
|
|||
|
that doesn't retrieve information about the usergroup or posts or does it?
|
|
#4
|
||||
|
||||
|
Um, no. It's like I read your post, but processed it wrong (I saw username and password and then....). Sorry. :/
|
|
#5
|
|||
|
|||
|
I think I found it out, forgot to just look through the files.
Code:
<?php
function UserInfo($username,$password)
global $vbulletin;
$username = strip_blank_ascii($username, ' ');
if ($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['password'] != iif($password AND !$md5password, md5(md5($password) . $vbulletin->userinfo['salt']), '') AND
$vbulletin->userinfo['password'] != iif($md5password, md5($md5password . $vbulletin->userinfo['salt']), '') AND
$vbulletin->userinfo['password'] != iif($md5password_utf, md5($md5password_utf . $vbulletin->userinfo['salt']), '')
)
{
return false;
}
else if ($vbulletin->userinfo['password'] == '')
{
return false;
}
return $vbulletin->userinfo;
}
?>
|
|
#6
|
|||
|
|||
|
Is it possible to access global.php out of the /forums/ folder?
Like require_once("./forums/global.php"); My php file always freezes at the line if it isn't in the same directory. |
|
#7
|
||||
|
||||
|
use these lines to call global.php
Code:
chdir ('/path/to/your/forums');
require_once('./global.php');
|
|
#8
|
|||
|
|||
|
Quote:
Thanks though |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|