Firefox PHP

User Abstraction

Posted by lux 
User Abstraction
June 13, 2003 11:01AM
I'm interested in porting phorum (5.0.1a) to our upcoming application framework, using our framework as a wrapper (actually only took modifying 1 line in common.php to make it work -- see below).

The next question now is how best to cleanly integrate an alternate backend for the user authentication component. I could just gut the include/users.php file, but that would probably not work too well. If I can implement this as a mod, adding a couple extra hooks, that wouldn't be too bad. Perhaps if the phorum_user_* functions were to become aliases to methods of an object with a basic factory method, I could simply write an alternate backend.

Or what if a mod could alias and essentially override an existing component (such as users.php), and be included instead of the original? Basically, allowing mods to be called through special component-sized hooks.

What would the phorum community's advice be on this, before I get myself into trouble... ;)


PS. If line 17 in common.php is changed from:

$PHORUM=array ();


$GLOBALS['PHORUM'] = array ();
global $PHORUM;

this guarantees that even if phorum is loaded via an include, this array is still global and will still be accessible to the phorum API. This was the only change necessary to get phorum running as a 'box' in our own framework.

Re: User Abstraction
June 13, 2003 04:46PM
First, you will need to work with current CVS as I just reworked a major part of this that was breaking user abstraction.

Second, by design, you would currently gut include/users.php. Is that a problem? Any magic mods stuff there is going to be useless overhead on every page load.
Sorry, only registered users may post in this forum.

Click here to login