Home
The Toolkit for Online Communities
15894 Community Members, 0 members online, 2181 visitors today
Log In Register

auth::require_login

OpenACS Home : ACS API Browser : auth::require_login

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:
[ show source ]
Show another procedure: