auth::require_login (public)
auth::require_login [ -level level ] \ [ -account_status account_status ]
Defined in packages/acs-authentication/tcl/authentication-procs.tcl
If the current session is not authenticated, redirect to the login page, and aborts the current page script. Otherwise, returns the user_id of the user logged in. Use this in a page script to ensure that only registered and authenticated users can execute the page, for example for posting to a forum.
- Switches:
- -level
(defaults to"ok"
) (optional)- -account_status
(defaults to"ok"
) (optional)- Returns:
- user_id of user, if the user is logged in. Otherwise will issue a returnredirect and abort the current page.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- package_normalize_path, xowiki_test_cases, link_tests, slot_interactions, path_resolve