Home » Wapka Codes 2021 » Check if logged user is an Admin
The following Wapka code can check if the logged user is an Admin:
:VAR(USER_ROLE).IFMATCH(Admin).THEN(Is an Admin).ELSE(Not an Admin);
It returns "Is an Admin" if the user belongs to any of the following roles: Administrator, Master Admin, or Super Admin.
Returns "Not an Admin" if the user belongs to any other role.
comment |
Recent Comments