3rd Party login.php troubles

Adds complete user authorization to Roster

Moderator: mdeshane

3rd Party login.php troubles

Postby mdeshane » Sun Dec 16, 2007 3:04 am

Alright, I've made quite a few changes and everything is running pretty smooth with the addon. However, I'm trying to build the login.php file so Accounts can be a full user/authentication system directly integrated with roster. The only problem is, when I try to login using this auth system it fails. Unfortunately my addon makes alot of use of the $addon global, which is not supported outside the addon. So during a login it can't find the user table because the usertable is set with this line in inc/conf.php:
Code: Select all
define('utable',$roster->db->table('user'$addon['basename'])); 


I've attempted to define it using 'accounts' instead of $addon['basename'], but of course it still tried using the define utable instead of placing the actual table. What should I do? Would an SVN update help so others can look at the code and see what's wrong?
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

3rd Party login.php troubles

Postby zanix » Sun Dec 16, 2007 5:03 am

Probably, then I can see what/where something might need to be changed

Also, what files does your login.php require?
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

3rd Party login.php troubles

Postby mdeshane » Sun Dec 16, 2007 5:10 am

The changes are in the SVN. The login.php file includes inc/user.lib.php, that file includes inc/conf.php which has all the config info/table info.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

3rd Party login.php troubles

Postby zanix » Sun Dec 16, 2007 5:39 am

in inc/login.php
Before
Code: Select all
include_once ('user.lib.php');

Add
Code: Select all
$addon = getaddon('accounts');
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

3rd Party login.php troubles

Postby mdeshane » Sun Dec 16, 2007 7:42 am

Thanks! Wish I had thought of that...
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US


Return to Accounts

Who is online

Users browsing this forum: No registered users and 0 guests

cron