[pmwiki-users] Attributes - edit password

Ajitabh Pandey ajitabhpandey at yahoo.com
Fri Mar 31 12:31:59 CST 2006


Well my case, it is slightly odd. All my users names
start with lower case, but their Profiles page is
first character capitalise.

So I did the following (added strtolower function) and
it worked:

$pagename = ResolvePageName($pagename);
  if (preg_match('/^Profiles\\./', $pagename))
      $DefaultPasswords['edit'] =
"id:".strtolower(Pagevar($pagename, '$Name'));

Thanks.

Cheers.
Ajitabh Pandey

--- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:

> On Fri, Mar 31, 2006 at 09:38:55AM -0800, Ajitabh
> Pandey wrote:
> > PM,
> > 
> > My requirement is also similar, but I want to set
> the
> > default edit restrictions on a user's page to
> whatever
> > the users password is:
> > 
> > If I do something like this will it be ok:
> > 
> > # Added following lines in the local/Profiles.php
> > # in order to apply restrictions page wise
> > $pagename = ResolvePageName($pagename);
> > $userid = substr($pagename, 9);
> > if ($pagename != "Profiles.Profiles" ||
> > $pagename!="Profiles.HomePage")
> >   $DefaultPasswords['edit'] = "$userid";
> 
> Try:
> 
>     $pagename = ResolvePageName($pagename);
>     if (preg_match('/^Profiles\\./', $pagename)) 
>       $DefaultPasswords['edit'] =
> "id:".Pagevar($pagename, '$Name');
> 
> This means that Profiles.Alice can only be edited by
> "Alice",
> Profiles.Bob can only be edited by "Bob", etc. 
> (Unless of
> course someone sets a different edit password on the
> page or group.)
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list