Support

Admin Tools

#31869 Login Guard options for user in front end

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Saturday, 23 November 2019 17:17 CST

kentmorrison
Using Login Guard WITH COmmunity Builder

1. Cannot see how the user can choose to use 2FA from their front end login profile edit
2. Cannot see how the user can choose to use 2FA from their Commuity Builder profile edit.

Thank you !
Kent

nicholas
Akeeba Staff
Manager
This is something you need to ask Community Builder developers. LoginGuard is using the standard Joomla method for adding custom sections to the Joomla user profile page. Namely, we're using a user plugin which handles the onContentPrepareForm core Joomla event to add a form section.

As far as I know, Community Builder manages its own user profile fields in a system parallel but not linked to Joomla's. Therefore all standard user profile plugins for Joomla won't work with it.

That said, you do not need to use the user profile field to let your users manage their Two Step Verification. You can always create a new menu type of type Akeeba LoginGuard, Set up Two Step Verification. This menu item will show your users a page with the same controls to set up and manage their Two Step Verification as our user plugin. I assume you could ask Community Builder support if you can add a link to a menu item in the CB user profile so you can take your users to that page.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

kentmorrison
Nicholas,
Great answer, and if I actually hack it hard enough to include the LoginGuard 2FA Setup dialog into the User Profile Edit, I will surely let you know and show that.

In the meantime, I have taken your suggestion to create a Setup Your 2FA menu item, and of course that works great!

Now I want to make a module, probably based on BreezingForms Pro, that will say to a user "We see that you are not using 2FA, blah blah and so on"
I want this visible ONLY to users (registered members) that have not set up 2FA with LoginGuard.
I can do this with BreezingForms logic scripts, I think, but I need to know the name of the Variable that LoginGuard uses to know whether to show the user the LoginGuard key code prompt.
Will you tell me the name of that variable, please, and any tricks I might need to know?

Thank you !
Kent

nicholas
Akeeba Staff
Manager
It's not a variable. There's a whole lot of logic behind it to check if the user has active Two Step Verification methods, if the plugins for these methods are published etc. You are asking me how to reproduce the entire LoginGuard engine.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

kentmorrison
Nicholas,
Well, no, I am not qualified to use such info anyway, I am not a programmer.
Is there not some value or trigger condition that I can read to find out if a given user has already setup 2FA ?
Thank you,
Kent

nicholas
Akeeba Staff
Manager
I'm sorry, there is no simple way to do that. That's why we have a user plugin.

Please remember that enabling, disabling and managing (adding or removing) Two Step Verification methods uses exactly the same page that I told you to create a menu item for. Name the menu item something like "Manage Two Step Verification".

Furthermore, the "User - Akeeba LoginGuard protection" plugin has the "Redirect on login" option. Leave it enabled to redirect users who don't have 2SV enabled on their account to a page asking them to enable it. If you want to send them to a custom page use the Custom Redirection URL option. These features are designed so you can easily do what you are trying to do with an unnecessarily complicated and inefficient way.

Finally note that nothing I've told is new information. Everything I said is already documented. Please re-read the documentation and think again about your implementation.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

kentmorrison
Nicholas,
OK, thanks very much.
Be advised that I forgot to tell you that I tried turning on the redirect method in the "User - Akeeba LoginGuard protection" plugin, and when I login with a test account, it does not redirect me to this page:
https://rangerlegacynetwork.com/index.php/2fa-redirect

I have tried turning redirect ON and OFF in Joomla and in Community Builder, but no combination of these enables the redirect that I'm trying to do.
I am going to search the Community Builder forum for integration details with LoginGuard.

Thnx
Kent

nicholas
Akeeba Staff
Manager
The redirection is a pretty simple affair. If the currently logged in user has not already been redirected AND has not opted out from being notified about Two Step Verification AND does not have any valid TSV method AND does not belong to a user group where TSV is forcibly disabled THEN we tell Joomla to redirect to the URL you've provided.

I would however advise against putting an absolute URL. Joomla rejects them in redirections. Try using a relative URL, i.e. index.php/2fa-redirect instead. It's the same thing as the redirection after login in Joomla's login module.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!