Skip to content

The system plugin

Nicholas K. Dionysopoulos edited this page May 10, 2024 · 4 revisions

The system plugin System - Akeeba Social Login is responsible for loading the code of the social login system and rendering the necessary login and link / unlink buttons. It must be published for the Social Login system to work.

Joomla 3

Its options control the automatic button injection in specific pages. We strongly recommend using custom template overrides for optimal presentation.

The options of the plugin are:

Frontend Login Modules' names. Akeeba Social Login can inject the login buttons at the end of a login module's regular HTML output. However, it needs to know which modules are used for login. You can do that by giving a comma-separated list of Joomla! module names in this option, e.g. mod_login, mod_myfancylogin etc. The name of a module is the same as its folder name inside the site's modules folder. Set this option to none -or anything else that doesn't start with mod_- to disable this feature so that you can use custom template overrides.

Frontend Login Modules' names. Same as above, but for the backend (administrator) login. By default this is set to none which disables this feature. If you want to allow login to your site's backend using SocialLogin please set this to mod_login. This is the only possible backend login module in Joomla! 3. Please remember that if you set the Add buttons to login page option below to No you must apply template overrides to the backend mod_login module for Social Login to work with it.

Add buttons to login page. When enabled Akeeba Social Login will add social login buttons at the end of the HTML output of the Log In page of Joomla!'s com_users component. The aesthetic result may be a bit off since the buttons are rendered below the Forgot your username links. We recommend that you set this option off and use custom template overrides instead.

Add buttons to user account page. When enabled the link / unlink buttons are added to the user account edit page as long as it's rendered by Joomla's com_users component. Adding extra field to that page requires injecting an XML form on the fly which is only possible through the plugin. Therefore we do not recommend turning this option off. However, if you do not want to allow users to link / unlink their Joomla! user account with their social media accounts OR if you have a third party extension handling the user profile and you want to use custom template overrides with it you can disable this option.

Joomla 4

Its options control the behavior of SocialLogin plugins.

The options of the plugin are:

Add buttons to user account page. When enabled the link / unlink buttons are added to the user account edit page as long as it's rendered by Joomla's com_users component. Adding extra field to that page requires injecting an XML form on the fly which is only possible through the plugin. Therefore we do not recommend turning this option off. However, if you do not want to allow users to link / unlink their Joomla! user account with their social media accounts OR if you have a third party extension handling the user profile and you want to use custom template overrides with it you can disable this option.

Show the don't remind field in the user account page. By default, SocialLogin displays a rather obtrusive reminder message in the user profile page reminding the user to link a social network account when they have not done so already. This option adds a button to dismiss this message without linking a social network account.

User Group when social network account is linked. Optional. Users who have linked a social media account will be dynamically added to this user group. “Dynamically” means that this connection is not recorded in the database. The user appears to be in that user group only throughout their session. This allows you to target modules, menu items etc only to users who have already linked their account to a SocialLogin provider.

User Group when social network account is NOT linked. Optional. Users who have not yet linked a social media account will be dynamically added to this user group. “Dynamically” means that this connection is not recorded in the database. The user appears to be in that user group only throughout their session. This allows you to target modules, menu items etc only to users who have not yet linked their account to a SocialLogin provider.

Using the dynamic user groups

You may want to display or hide content depending on whether the currently logged-in user has linked their user account to a social login or not. For example, you may want to display some article or module content only to people who have used a social login. Or, you may want to display a Custom HTML module with a Call To Action only to people who have not yet linked their account to a social login. This is where this feature comes from.

To use this feature, start by creating two user groups under the Public level:

  • With SocialLogin
  • Without SocialLogin

Then, create two new Access Levels

  • With SocialLogin selecting only the With SocialLogin group
  • Without SocialLogin selecting only the Without SocialLogin group

You can now assign any kind of Joomla! content to either of these Access Levels to control when it's show based on whether the user has a social login linked to their user account.

Since users are assigned a user group depending on whether they are linked to a social login, you can do even more advanced stuff. These groups work just like any other Joomla user group. They can be assigned permissions, and these permissions will be applied to the user logged into the site.

It's easier to understand with an example.

Let's say you only want users who have a social login linked to their user account be able to post comments with Akeeba Engage. No problem! Go to Components, Akeeba Engage, Options, Permissions. Click on the With SocialLogin group and set Comment to Allowed. Assuming that your other regular user groups (e.g. Public, Registered etc) have Comment set to Inherit you have now limited comments to users who have a social login linked to their account.

But, wait! We need to communicate that to the user. That's easy! Create a new Custom HTML module with a message to the tune of "You need to link your account to a social login to be able to comment.". Set its Access to Without SocialLogin and its Position to engage-before-reply. People who have not yet linked their account to a social login will see this message. You can include a link to their User Profile page to help them figure out what to do next. People who have already linked their account to a social login will NOT see this message; they will just see the reply area.

As you can see, dynamic user groups is an extremely powerful feature which allows the kind of site customisation that would otherwise require tons of layout overrides and custom coding. No need for that nonsense; we just manipulate Joomla! ever so slightly (about 100 lines of PHP code, really!) to unleash the powerful potential of Joomla's core access control features. They sky's the limit!