[pmwiki-users] How to store login information in a page and have their permissions determined by what group that page is in

Alex Eftimiades alexeftimiades at gmail.com
Thu Aug 9 20:50:27 CDT 2012

So far, I am able to do it with pagetextvariables using the following  
modification to AuthUser.php:
function AuthUserId($pagename, $id, $pw=NULL) {
   global $AuthId, $AuthUserSearchPatterns;
     foreach ($pages as $i => $pn) {
         if(PageVar($pn,'$:username')==$id &&  
           $authid = $id;
           $authlist['@'.FmtPageName('$Group', $pn)] = 1;
   if (!$authid) {$GLOBALS['InvalidLogin'] = 1; return; }
   if (!isset($AuthId)) $AuthId = $authid;
   $authlist["id:$authid"] = 1;
   $authlist["id:-$authid"] = -1;
   SessionAuth($pagename, array('authid' => $authid, 'authlist' =>  

Would anyone have any ideas as to how to go about improving on this? I  
would like to have people able to edit their usernames and passwords  
from their page. I was planning on using the EditAttributes recipe for  
that. This would make member management very easy. However, I am  
uneasy with having them have their personal information out in the  
open like this. Should I consider trying to save the information as  
page variables? For now, I am going to try to have everything  
encrypted. I seem to recall their being a functionality for that.


PS: If anyone thinks this would be useful I will consider writing up a  
cookbook recipe on it when I have everything polished. At least to me,  
it seems like a great way to store and manage login information.

On Aug 9, 2012, at 11:30 AM, Petko Yotov wrote:

> Alex Eftimiades writes:
>> red text that indicates it being nonfunctional. Did I  
>> misunderstand, or is that part of the recipe nonfunctional?
> I didn't notice that a part of the recipe was broken and abandoned.  
> I'm really sorry.
> Unfortunately, I don't know other AuthUser recipe storing its data  
> in the user profiles pages, except probably an earlier, working  
> version of this one. The only recipe which makes AuthUser  
> administration easier, and which I have used is http://www.pmwiki.org/wiki/Cookbook/HtpasswdForm 
>  but it is not at all what you described.
> Petko
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

More information about the pmwiki-users mailing list