- Compatible XF 2.x versions
- 2.2
- 2.3
[FX] Only Reg Google is a security and registration workflow add-on for
XenForo 2.2+ and 2.3+. It disables manual user registration, restricts new account signups exclusively to
Google OAuth (Connected Accounts), keeps existing account credentials fully functional, and provides an option to enforce password creation immediately after authenticating via Google.
Key Features
1.
Disable Manual Registration
- Completely blocks standard manual registration form submissions (POST /register/register). Any unauthorized manual POST request is rejected with a clear error notice.
- Automatically removes all manual registration input fields (Username, Email, Password, Captchas, Date of Birth, Custom Fields, etc.) on both the standard XenForo registration page (register_form) and modal popups (vnxf_login_register).
- Restricts new registrations strictly to Google, preventing registration through other connected providers (such as Facebook, Twitter, GitHub) if enabled on the board.
2.
Dedicated Google Registration Interface
- When visitors navigate to /register, they are presented with a clean, branded interface displaying the forum logo, an explanation notice, and a prominent "Continue with Google" button with official multicolor SVG Google branding.
- Includes a quick "Log in" link (supporting overlay modals) for existing members.
3.
Existing Accounts Unaffected
- Previously registered accounts continue to log in normally using their Username / Email and Password via /login.
- Standard forum login forms and member authentication workflows remain 100% intact.
4.
Enforce Password Creation (Force Password Creation)
- XenForo creates connected account users without a local password by default. This add-on introduces an enforcement mechanism:
- Forced Redirect Mechanism: After registering or logging in via Google without a local password (!hasPassword()), users are immediately redirected to /account/set-password.
- Users are restricted from browsing any other forum page until they establish a password (only the Log Out action is accessible).
- The set-password form features password strength validation and confirmation matching XenForo security standards.
- Once saved, the account is equipped with a valid password, allowing users to log in using either Google or their Username/Email and password at any time.
- Automatic Exemption: Existing members or accounts with passwords already configured are never prompted.
5.
Auto-Redirect to Google (Optional)
- Disabled (Default): Shows the registration notice page with the Google button.
- Enabled: Automatically redirects users visiting /register directly to the Google OAuth authorization screen.
6.
100% Phrased (Multilingual Ready)
- All user-facing strings, options, and error messages use standard XenForo Master Phrases in English, making customization or translation into other languages effortless.
AdminCP Configuration
Navigate to:
AdminCP > Options > [FX] Only Reg Google (admin.php?options/groups/fxOnlyRegGoogle/):
| Option | ID | Default | Description |
|---|
| Enable only Google registration | fxOnlyRegGoogle_enable | Enabled | Enables or disables the Google-only registration restriction. When disabled, standard registration resumes. |
| Force password creation after Google login | fxOnlyRegGoogle_forcePassword | Enabled | Requires members authenticated via Google without a local password to set one before browsing the forum. |
| Auto-redirect to Google on registration page | fxOnlyRegGoogle_autoRedirect | Disabled | Automatically redirects visitors navigating to /register directly to the Google OAuth prompt. |
System Requirements
- XenForo: 2.2.0 or higher (fully compatible with XenForo 2.3.x).
- PHP: 7.4 - 8.3+.
- Google Connected Account Provider: Configured and enabled under AdminCP > Setup > Connected accounts > Google.
Installation & Upgrade
Method 1: Install via AdminCP (Recommended)
- Download FX-OnlyRegGoogle-1.0.0.zip from releases.
- In AdminCP, go to Add-ons → Install/upgrade from archive.
- Upload the archive and click Install.
Method 2: Manual Installation / CLI
- Upload the add-on files to your XenForo root directory:
src/addons/FX/OnlyRegGoogle/
- Run the XenForo CLI installation command:
php cmd.php xf-addon:install FX/OnlyRegGoogle
-
only-reg-google.webp
110.5 KB
· Views: 12