[dokuwiki] user account modifications

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 15 Oct 2005 15:28:33 +0100

Hi,

I am in the process of completing a patch set to allow a user to alter their own dokuwiki profile - name, email and/or password - and to request a new password be sent (broadly based on Benoit Chesnau's code outlined at http://wiki.splitbrain.org/wiki:sendnewpassword).

The patch requires two new auth functions:

auth_deleteUser($user) - delete $user and any associated information

auth_modifyUser($user, $password, $name, $email, $groups) - update profile for $user, all fields should be provided, $groups is an array.

I have only implemented the above functions for auth_plain and placed stubs to give a message that these functions are not supported in the other three auth_* types in the general release.

The implementation is all a bit kludgy. The implementation dependent auth functions feel that they should be included in a class rather as "loose" functions. Thats particularly the case with plain, where auth_getUserData reads and stores all the user data statically where its not available to other auth functions and can't be changed. Apart from additions to dispatcher, template, html etc the only other change required is to io_deleteFromFile to allow it to support patterns*.

So before I finish and submit it all to Andi -
- Is this patch set desired?
- Is it worth refactoring the auth functions within an auth class?
- Are the two functions appropriate as I have outlined them?
e.g. deleteUser may not be appropriate as it may orphan page subscriptions and change log information


A sequel to this maybe an admin plugin to allow user administration - mainly adding/removing groups.

Cheers,

Chris


*does anyone have a feel for whether preg_grep is more efficient than a looping array_search?




--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: