[pmwiki-users] detecting default password changed

Peter Bowers pbowers at pobox.com
Fri Aug 22 01:16:15 CDT 2008


On Thu, Aug 21, 2008 at 6:42 PM, adam overton <a at plus1plus1plus.org> wrote:
> my question: is there a way to detect if someone has changed their
> password from the default password?

This solution seems to be working for me, but only if the edit
password is changed at a page level.  If it's changed at a group level
then this won't pick it up...

===(snip config.php)===
if ($action == 'edit') {
   echo "action=edit<br>\n";
   $FmtPV['$editpass'] = '$page["passwdedit"]';
}
===(snip)===

===(snip Site.AuthForm)===
(:if [ equal {$editpass} "" && equal {$Action} "edit" ] :)Please try qdk if
you don't know the password(:ifend:)
===(snip)===

To improve this $editpass should be named $editpassisdefault or
something and it should probably call a function (instead of just
returning $page['passwdedit']) which checks both page and group levels
and returns a true or false based on whether it's been overridden.  If
you do something like this, please post back as I'd like to do that on
my site - I just haven't gotten around to it.

-Peter



More information about the pmwiki-users mailing list