Contents
UserInfo
Background and rationale
Occasionally it is useful to customise a page to the current user by include user specific information.
To include instructions on how a user can email attachments to MoinMoin under dropbox_mailimport.py it was considered better to give the actual to and from addresses using the user's information rather than a generic examples.
Description
A macro to insert the current user alias, email or name.
The macro has a single argument to select which information is inserted; keywords 'aliasname', 'email' and 'name'. Name is the default.
If an unknown keyword is given, then 'error' is inserted.
If a users is not logged in 'unknown' is inserted.
Usage
<<UserInfo>> <<UserInfo()>> <<UserInfo(keyword)>> keyword=aliasname: inserts user alias keyword=email: inserts user email keyword=name: inserts user name (as does <<UserInfo>> and <<UserInfo()>>
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
1.0 |
1.9.2 |
|
Examples
Your email must be: * sent from: <<UserInfo(email)>>, and * addressed to: <<UserInfo>> <wiki''@''domain>
Renders as:
Your email must be:
sent from: unknown, and
addressed to: unknown <wiki@domain>
Note: If you are not logged in, 'unknown' will be inserted above, rather than actual user information.
History
Inspired by MoinMoin macro CurrentUser by Oliver Siemoneit (copyright: 2006)
Copyright
@copyright: 2011 Ian Riley <ian@riley.asia>
License
GNU GPL, see COPYING for details.
Known issues and limitations
- None
- Hits
385