[pmwiki-users] detecting default password changed

adam overton a at plus1plus1plus.org
Fri Aug 22 03:28:02 CDT 2008


hi peter
thanks for the tip!
i'll look into this...

however - i was just fiddling around and maybe found a [suspiciously]  
super-easy way to check...
i noticed that when a user creates a new group, the group attributes  
page doesn't exist yet -- it's only created once the user goes to  
change the password and clicks 'save'...
so i'm guessing (:if exists Group.GroupAttributes ... should work...

that almost seems too easy though... anyone foresee any problems with  
that (besides of course if someone goes to change a password, and  
just types in the default pw)?

thanks,
adam





On 21 Aug 2008, at 11:16 PM, Peter Bowers wrote:

> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080822/b04451bd/attachment.html 


More information about the pmwiki-users mailing list