[geeklog-devel] GL2 Login works

Tony Bibbs tony at tonybibbs.com
Mon Dec 20 16:51:21 EST 2004


Pretty soon here I will be checking in a version of Geeklog 2 which 
successfully authenticates a user.  I have taken care to factor the code 
in such a way that the means by which one manages a user account can be 
changed by simply implementing one class and changing a setting in the 
config file.

Being that noone has looked into the code yet (hint, hint) I'll take 
this time to discuss the basic design:

The most basic part of the account management equation is the 
Geeklog_AccountManager (in AccountManager.php).  It's job is to read the 
Account Manager it needs to create from a value in the configuration 
file ($glConf['account_manager']), and generate an instance of that 
class which is responsible for doing the work.

All account managers must implement the Geeklog_AccountManagerInterface 
(AccountManagerInterface.php) which provides methods for creating 
accounts, deleting accounts, authenticating users and changing 
passwords.  Other method will probably be added to this interface (i.e. 
update account, etc) but I won't bother with them until we establish the 
need.

As such, I have created default AccountManager...named 
Geeklog_DefaultAccountManager in DefaultAccountManager.php (see the 
pattern?).

All this said, one could, for example, create a LDAPAccountManager, 
IMAPAccountManager, etc to have GL2 authenticate to any datastore.  I'd 
like to see LDAP and IMAP bundled in with GL2 (any takers?).

So, have a look in CVS and let me know what you do/don't like about what 
I have so far.

--Tony



More information about the geeklog-devel mailing list