Hey Everyone - I spent a hell of a lot of time trying to get some functionality that I was just able to finally get wanted to share with everyone.
Basically my clients IPB didn't rely on usernames - it was mostly email addresses so I wanted this process to ALSO check if the user typed in an EMAIL address into the login and initiate this script properly if email matched the "email" field in IPB.
I then use
https://vborg.vbsupport.ru/showthread.php?t=275348 which will take over the login process AFTER the new PW is saved.
All you need to do is edit the controller.php file in your ipbauth folder:
Find
PHP Code:
function fetch_userid_from_username($username) {
global $vbulletin;
if ($user =
$vbulletin->db->query_first("SELECT userid
FROM " . TABLE_PREFIX . "user WHERE username = '" .
$vbulletin->db->escape_string(trim($username)) . "'")) {
return $user['userid'];
}
Add Below:
PHP Code:
else if ($user =
$vbulletin->db->query_first("SELECT userid
FROM " . TABLE_PREFIX . "user WHERE email = '" .
$vbulletin->db->escape_string(trim($username)) . "'")) {
return $user['userid'];
}
Works like a charm!
I'm no programmer so use this at your own risk - I very well could be missing something and it could not be doing something that is important here...