Join Now

Click here to join our
growing community:

JOIN LOGIN



Docs

Welcome Tour
Handbook
      Markups
      Variables
      Conditions
      Functions
      Forms
      Commands
      Concepts
Extensions
Pro Modules
Developers



Copyright © 2020
Terms of Use
Privacy Policy
BoltWire

Handbook

Admin

This conditional determines whether the current user has admin permissions. Or, you can supply a user ID and check if that user is an admin. It is a shortcut for [if ingroup admin]

Examples:

[if admin]You are an admin[if]
[if admin bob]Bob is an admin[if]

Admins are defined on page group.admin and have special built in permissions within BoltWire. Be careful about giving admin permissions to users.

To generate a list all admins on a site, you could use this markup:

[(search group=member* if='admin {+p2}' fmt='[[~{+p2}|+]]')]

Of course a more efficient approach might be to do this:

[(list page=group.admin fmt='[[~{+p}|+]]')]

Note that the built in admin condition also checks if the current user is a superadmin defined in index.php, whereas the latter option simply lists normal admins.