[request] auth_user again

From: Date: Tue, 30 Jul 2002 19:56:27 +0000
Subject: [request] auth_user again
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8091@lists.php.net to get a copy of this message
as i pointed out earlier - user maintain class is needed. i have a proposition how to make something like this with not much effort but giving quite a lot of using possibilities. think of class Auth_User extending Auth - most of functionality is already written. what needs to be done is getting additional data from container - with user privileges. i thought about adding a column (example based on sql database, but probably its going to work in rest of them with little effort) with integer containing binary encoded user access rights (see it in 'web application development with php4'). new class could overload standard getAuth method to check if access rights requirements have met (new param with default value=''). getting privileges data is easy - containers only need to save additional column(s) somewhere inside (db container can select *, but additional data is lost and only user name is saved). additional functionality can be added by callback functions - if someone has different privileges encoding method he could get all the data fetched from container and apply his own check funcions. my idea is mostly based on php_lib`s perm class, but additionaly i would like to add some simple session variables managment so all user data could be accessed by this single class. little changes in auth containers are required (i don`t know if all of them can store additional data) and the class would be still compatible with Auth - code examples written for this class would work without changes but with extended functionality. so - what do you think about that? pros/cons? rash

« previous php.pear.dev (#8091) next »