[pmwiki-users] UserAdmin templates

Hans design5 at softflow.co.uk
Sun Mar 27 03:38:29 CDT 2011


Sunday, March 27, 2011, 12:14:06 AM, Peter Bowers wrote:

> In AuthUser it is implemented using an extended syntax:

> user: HASH @group @group2 : useremail="abc at example.com" userrealname="Sam Smith"

> So basically everything before an optional 2nd colon is identical to
> current operation.  Anything after the 2nd colon is in ParseArgs()
> format, fields must begin with the prefix "user", and additional
> fields can be added.

I added  to New user template form [[#ua-new]]

|| Full name||(:input text userrealname:) ||

but 'userrealname' does not get saved.

I am using the scripts as found attached to Cookbook.UserAdmin.
I scanned the code, an dit seems that the fields are hard coded
in useradmin-core.php:

class UserAdmin {
        var $confirm_email = TRUE;
        var $fields = array(
                'new' => array(
                        'username' => UA_REQ_NOT_EMPTY,
                        'userpasswd' => UA_REQ_TWICE,
                        'useremail' => UA_REQ_NOT_EMPTY),
                 .............

Perhaps that was changed in not-released not-yet-functional code.
Or I am  missing something.

Anyway, apart from extending the template  to catch more user info
all seems to work fine.

One other observation:
it is possible to register different user names
with the same email address.
Although this is nice for testing the script, I think a configuration
switch should prohibit use of the same email address by default,
i.e. same as username is checked the new useremail should be checked
as well, and rejected if it exists for  a user already.

cheers,
  ~Hans




More information about the pmwiki-users mailing list