[pmwiki-users] UserAdmin cookbook

Alex alexware at szokesandor.hu
Tue Feb 16 15:02:49 CST 2016


Dear List!

I am trying to set-up the UserAdmin recipe to my test site. I do want
only to have the possibility of my users to change or reset their
passwords, if it is forgotten without admin interaction.

My config is at the bottom of the e-mail.

I found some issues that I would like to share:
 - I do not understand how the recipe is activated. I am using
useradmin-authuser.php

I modified useradmin-core.php to echo debug message upon activation:
############################# start of cut
$RecipeInfo['UserAdmin']['Version'] = '2015-09-20';

if (strncmp($action, 'user', 4) == 0)
    SDV($HandleActions[$action], 'HandleUserAdmin');
function HandleUserAdmin($pagename, $auth = 'read') {
	global $action, $UserAdmin;

echo "DEBUG: <pre>action: ".print_r($action,true)."</pre><br>\n";
    SDV($UserAdmin->pagename, $pagename);
############################# end of cut
When an anonymous user fires "action=user", it does not display the
debug message. It also cause that an anonymous user cannot access
resetpassword or unlock form! How can this happen? Am I miss something?


 - There is a paragraph "Configuring the main menu for UserAdmin options"
There is also a page for template definitions: Cookbook.UserAdminTemplates

I thought, that they are both needed at start, but found that there are
some inconsistency issues with the forms:
 1. There is an excellent mechanism, which menu item to display, to what
type of user. If there is a form defined, it totally breaks this
definition. Only one template can be used. :(
 2. When using the forms e.g. the reset password form, initially only
containing the username, but for the script require the user e-mail
address also. Therefore, it is not working with this "default" template.
I have spent several minutes to figure it out.


I would need some advice for the first section.
The second is only a comment.

Thanks.
Alex

PS: I have the following config:
########### config.php
## User account self-registration and management
include_once("$FarmD/cookbook/useradmin-authuser.php");
$UserAdminActions['onlyadmin']     = array('new','group', 'install'); #
only admin can add new user
$UserAdminActions['onlyauth']      = array('edit','logout');
#'unlock','resetpasswd',
$UserAdminActions['onlyanonymous'] = array('login');
$UserAdminActions['anonymous']     = array('login','unlock','resetpasswd');
$UserAdminActions['extra']         = array('login','login2edit','logout');

## user: password identification
include_once('scripts/authuser.php');

########### end of auth section from config.php





More information about the pmwiki-users mailing list