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 (optional, defaults to "ok")
-account_status (optional, defaults to "ok")
Returns:
user_id of user, if the user is logged in. Otherwise will issue a returnredirect and abort the current page.
See Also:

Testcases:
package_normalize_path, xowiki_test_cases, link_tests, slot_interactions, path_resolve
[ show source ]
Show another procedure: