[pmwiki-users] UserAdmin cookbook

Peter Bowers pbowers at pobox.com
Thu Feb 18 04:24:32 CST 2016


On Tue, Feb 16, 2016 at 10:02 PM, Alex <alexware at szokesandor.hu> wrote:

> 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?
>

It has been quite some time since I have worked on this recipe. By
"anonymous user" do you mean users who have logged in with a password but
without a username? If so I will have to do some testing - I don't use that
particular capability often and so it is likely the recipe is under-tested
for these.

>
>  - 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. :(
>

Can you explain your concern in more detail? For instance, "If I have X
template defined then Y functionality does not work". I am quite certain
that I have tested systems both WITH and WITHOUT templates defined as well
as combinations of the above, but clearly there is some edge condition that
I have missed.



>  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.
>

Email is a required field since we use it in so many different areas to
confirm identity (i.e., a password reset is impossible without email using
current functionality). Are you saying the difficulty occurred during the
migration period when you had existing users defined without the email
address being available?

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20160218/b1ed6384/attachment.html>


More information about the pmwiki-users mailing list