View · Search · Index

Configuring login and registration in OpenACS

Choose who can create accounts, how users prove they control their email addresses, and whether an administrator must approve access. These options work together. This recipe covers the built-in Local authority on OpenACS 6.0.0, including the verified password setup flow in ACS Subsite 6.0.0d14.

Choose the registration policy

Setting Where to configure it Effect
AllowSelfRegister Site-wide, ACS Authentication Set to 1 to allow users to create their own accounts. Set to 0 for administrator-created accounts only.
RegistrationRequiresEmailVerificationP ACS Subsite instance Set to 1 to require proof that the user controls the email address.
RegistrationRequiresApprovalP ACS Subsite instance Set to 1 to require an administrator to approve the account.
RegistrationProvidesRandomPasswordP ACS Subsite instance Set to 1 to hide the password fields and generate the initial credential. Set to 0 to let users choose a password on the form.
RegistrationShowsHomePageP ACS Subsite instance Defaults to 1 and shows the optional Personal Home Page URL. Set to 0 to hide it during registration. If the registration authority requires a homepage URL, it remains visible and required. Profile editing is unaffected.

Email verification and administrator approval are independent. If both are required, completing verification or setting a password can still leave the account awaiting approval. A user who enters valid credentials for a pending account should see Awaiting approval on the login form.

Self-registration and password setup

  • User chooses a password. With RegistrationProvidesRandomPasswordP=0, the registration form accepts the chosen password. If email verification is required, the user confirms the address and then signs in with the same password once any approval requirement is satisfied.
  • OpenACS generates the initial credential. With both RegistrationProvidesRandomPasswordP=1 and RegistrationRequiresEmailVerificationP=1, Local self-registration sends one verification email. Its link opens a confirmation page, then offers an expiring, single-use Set password link. After setting the password, the user goes to a clean login page. Any administrator approval requirement still applies.

Email changes and account identity

The old email address stays active until the user confirms the new one through the link sent to the new address. See bug #3471.

Verified email changes preserve the username. When email login is enabled, users sign in with their current email address. Integrations should use user_id as the stable OpenACS account identifier.

Administrator-created accounts

In Site-Wide Administration, Add a user defaults to the Local authority. If more than one enabled authority can create accounts, selecting another authority reloads the account form with the fields it requires. Choose the authority before entering account details. Public self-registration still uses the site-wide ACS Authentication parameter RegisterAuthority.

In Site-Wide Administration, add the user and choose Send invitation when you want them to set their own password. The invitation delivers an expiring, single-use link. Setting a password through the invitation preserves any outstanding email verification and administrator approval requirements.

Set AccountEmailFrom on the relevant subsite to customize the sender for account mail. With an empty value, OpenACS uses its configured outgoing sender. The localized account mail templates are in packages/acs-authentication/lib/email/. Registration notifications to administrators use NewRegistrationEmailAddress.

Subsite handling

On a path-mounted subsite, /your-subsite/register/ is the login page and /your-subsite/register/user-new is the self-registration form. A subsite can use different login and registration options and different handlers from the main site or another subsite. Set the registration parameters on the instance that serves the form. Subsite join policies such as open, closed, and needs approval control subsite membership. The account-level approval setting above governs the site account.

If an anonymous visitor is sent to the main site’s /register/, check effective read permission for The Public on the subsite. OpenACS can fall back to the main login page when the public cannot read the subsite. If the subsite is meant to accept anonymous visitors, check the grant and its effective result. Also check RegistrationRedirectUrl and any LoginTemplate or UserNewTemplate override. A custom template can change which form or links the visitor sees.

When modifying login or registration locally, also check the Tcl/ADP templates mirrored by the theme active on that subsite. Look under packages/<theme>/resources/templates/packages/acs-subsite/ and check any separate login widget in resources/widgets/. A theme override can keep serving its own copy after the core template changes. Verify the change on each affected subsite with its active theme.

Test the configuration

  1. Use a disposable account in a private window. Start from the intended subsite and check whether the form shows the password and homepage fields as configured. You can check field visibility without submitting the form.
  2. Register and check which message arrives. For generated passwords with verification required, expect a single verification email. Verify the address, set a password, and confirm the same setup link is rejected on reuse.
  3. Check that the login URL is clean and that the password works. If approval is required, check the pending message before approval and retry after approval.
  4. Test the invitation path separately. If a form opened from an existing login fails CSRF validation after logout, reload the form as an anonymous visitor and check that the deployed self-registration code redirects to a fresh GET before rendering.

Related changes: verified password setup, administrator invitations, pending approval on login, account email templates, and optional homepage field.

previous December 2026
Sun Mon Tue Wed Thu Fri Sat
29 30 1 2 3 4 (1) 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2

Popular tags

17 , 5.10 , 5.10.0 , 5.10.1 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , Azure , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , conference , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD
1 registered user in community xowiki
in last 30 minutes
Contributors

OpenACS.org