Download the PHP package thisanimus/craft-ccb-login without Composer
On this page you can find all versions of the php package thisanimus/craft-ccb-login. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thisanimus/craft-ccb-login
More information about thisanimus/craft-ccb-login
Files in thisanimus/craft-ccb-login
Package craft-ccb-login
Short Description Log in via the CCB API, and log user info in session.
License MIT
Informations about the package craft-ccb-login
CCB API Authentication for Craft CMS 4.x/5.x
A session-based login for Craft CMS 4.x/5.x that authenticates users via the Church Community Builder API.
Requirements
This plugin requires Craft CMS 4 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require thisanimus/craft-ccb-login
- In the Control Panel, go to Settings → Plugins and click the “Install” button for craft-ccb-login.
Configuration
In the Craft Control Panel, enter your CCB API User Credentials. These will be used to make the necessary API requests.
Overview
- User submits a username and password through a form on the front end of your site.
- The plugin passes those creds to the "individual_profile_from_login_password" service of the CCB API.
- If the user exists in CCB, the plugin then fetches the user's profile, and the IDs of the groups this person is a part of.
- The plugin sets the authentication status and the user information as session variables.
Successful Login
Unsuccessful Login
Session Vars
Access the session vars in your template using the included plugin twig var:
This gives you access to a user's authentication status, profile info, and group memberships. You can use these as conditions when determining what gets rendered in the twig template.
Twig Templates
Here are some templates to get you started:
Login
Logout
Conditional Markup with CCB Login Sync
Credits
Praise and rotten tomatoes alike may be lobbed at Andrew Hale.