[pmwiki-users] Question about Login Names

Patrick R. Michaud pmichaud at pobox.com
Tue Mar 21 10:41:46 CST 2006


On Tue, Mar 21, 2006 at 09:48:45AM -0500, The Editor wrote:
> 
> Is there some way to automatically modify a login name to
> automatically be the same it would be changed to if being used as a
> page name?  

The MakePageName function automatically converts a string into
its equivalent pagename.  So, you might want:

    $username = PageVar(MakePageName($pagename, $user), '$Name');

The MakePageName() function takes a string like "alice roberts"
and turns it into  "Group.AliceRoberts".  The PageVar() function
then extracts just the name portion of that (i.e., "AliceRoberts").

Pm





More information about the pmwiki-users mailing list