# Summary

The LoginToboggan module offers several modifications of the Drupal login system in an external module by offering the following features and usability improvements:

  1. Allow users to login using either their username OR their e-mail address.
  2. Allow users to login immediately.
  3. Provide a login form on Access Denied pages for non-logged-in (anonymous) users.
  4. The module provides two login block options: One uses JavaScript to display the form within the block immediately upon clicking "log in". The other brings the user to a separate page, but returns the user to their original page upon login.
  5. Customize the registration form with two e-mail fields to ensure accuracy.
  6. Optionally redirect the user to a specific page when using the 'immediate login' feature.
  7. Optionally redirect the user to a specific page upon validation of their e-mail address.
  8. Optionally display a user message indicating a successful login.
  9. Optionally combine both the login and registration form on one page.
  10. Optionally have unvalidated users purged from the system at a pre-defined interval (please read the CAVEATS section of INSTALL.txt for important information on configuring this feature!).
  11. Integrates with Rules module to do various tasks when a user validates via email validation process (see http://drupal.org/node/880904 for an example)

# Project URL

https://www.drupal.org/project/logintoboggan

# Where is the code?

#2147969: Drupal 8 and 9 version of Logintoboggan

# Estimated completion date

TBD

# Dependencies

N/A

# Who's doing the port?

InternetDevels

# What help do they need?

Unknown

# D8 roadmap

TBD

# Background and reference information

#2147969: Drupal 8 and 9 version of Logintoboggan

Comments

jjozwiak created an issue. See original summary.

jjozwiak’s picture

Issue summary: View changes
kristen pol’s picture

Issue summary: View changes
MakeOnlineShop’s picture

This should have been in core just as facebook login.

Thank you for porting this module !

Sorry but i just installed it, had some problems (cannot access to some menus) and then I cannot uninstall it, any idea ?

Thanks.

grn’s picture

The same as #4. You are actually able to use "drush dl logintoboggan" in Drupal 8 right now. This downloads the Drupal 7 module. And then you actually can use "drush en logintoboggan" which enables the module Jaix. :-)

It does not work though and you can't remove it. :-/

"drush pmu logintoboggan" then gives you:

The following extensions will be uninstalled: logintoboggan
Do you really want to continue? (y/n): y
exception 'Drupal\Core\Config\ImmutableConfigException' with message [error]
'Can not delete immutable configuration logintoboggan.settings. Use
\Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve
a mutable configuration object' in
/http/core/lib/Drupal/Core/Config/ImmutableConfig.php:51
Stack trace:
#0
http/modules/logintoboggan/logintoboggan.install(33):
Drupal\Core\Config\ImmutableConfig->delete()
#1 [internal function]: logintoboggan_uninstall()
#2
http/core/lib/Drupal/Core/Extension/ModuleHandler.php(391):
call_user_func_array('logintoboggan_u...', Array)
#3
http/core/lib/Drupal/Core/Extension/ModuleInstaller.php(388):
Drupal\Core\Extension\ModuleHandler->invoke('logintoboggan',
'uninstall')
#4
http/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91):
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#5
......

And you are not able to remove it from the module list in the GUI. The GUI Uninstall of the module gives you:
White screen with: "The website encountered an unexpected error. Please try again later."

"Drush cr" gives you:
drush cr
PHP Fatal error: Class 'Drupal\logintoboggan\Access\LogintobogganValidateAccess' not found in http/core/lib/Drupal/Component/DependencyInjection/Container.php on line 264
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class
'Drupal\logintoboggan\Access\LogintobogganValidateAccess' not found
in
http/core/lib/Drupal/Component/DependencyInjection/Container.php,
line 264

Be careful Drupal 8 users! :-)

niklp’s picture

TL;DR - this module is not yet ported. As per the releases...

kenneho’s picture

Is it likely that the module will be released for Drupal 8 within the next few months? Or are there alternative modules out there which can fill as a replacement for this module?

mmjvb’s picture

Status: Active » Needs work

With a development branch on d.o. Status should be Needs work

jas1988’s picture

same problem, breaks permissions menu, taxonomy menus etc and we cannot uninstall it via console or backend both.

robotjox’s picture

Replace logintoboggan.uninstall with this to uninstall the module:

/**
 * Implement hook_uninstall().
 */
function logintoboggan_uninstall() {
  drupal_uninstall_schema('logintoboggan');  
  \Drupal::configFactory()->getEditable('logintoboggan.settings')->delete();
}
tr’s picture

#10 is wrong.

drupal_uninstall_schema() hasn't been needed since Drupal 6, and shouldn't be used here. In both Drupal 7 and Drupal 8 the schema is automatically removed by core when the module is uninstalled.

Likewise, config settings do not need to be removed explicitly - they are removed by core when the module is uninstalled.

The proper fix here is to just remove logingtoboggan_uninstall() entirely (that is, delete the entire logingtoboggan.install file), as it is not needed.

There are lots of other simple but fundamentally wrong things in the current D8 port of logintoboggan. For instance, the config .yml files should not be in logintoboggan/config, but should be in logintoboggan/config/install so they will be found by core. There should also be a config schema in logingtoboggan/config/schema. I wouldn't expect much to work at this point until the code has received a good updating.

1kenthomas’s picture

Any updates/traction here? Do we have any kind of roadmap of what needs to be done to get this critical module towards working order for D8? Failing that, what steps would need to be taken to assemble such a roadmap?

slawomir’s picture

Seeing that this module relies on Rules for several of its actions, and Rules is only in Alpha... looks like a long road ahead? :(

tr’s picture

Nonsense. The logintoboggan_rules submodule is trivial and could have been trivially ported to D8 three years ago. Rules is definitely NOT holding back logintobogan in any way. See my comment in #11 - there are many obvious easy to fix things, if there is anyone maintaining this module. Rules is not any part of the problem.

Rules is alpha only because of the UI and because of a very few missing features. It is fully functional and has been for years.

natts’s picture

I'd really like to get a D8 release viable, for a project I am working on.

@TR - are you will to list all the changes you think are necessary? I'd be happy to work on implementing (some) of them myself.

tr’s picture

The first thing that needs to be done is someone needs to step up and become a maintainer for this module. That someone should follow the procedure at Dealing with unsupported (abandoned) projects then while waiting the required 2 weeks that someone should go through the issue queue for D8 issues and start addressing those.

When we get a maintainer to move this forward, that person should turn on testing so we can evaluate submitted patches, then the pending issues should be finished/committed, and then we can start making progress.

There's no ambiguity about what needs to be done for the port - it's the same list of things you would normally do when porting any other module to D8. Far too many to list, but there are many sites that discuss in detail how to port modules to D7. Drupal 8 core has had so many changes in the past few years that even working modules that haven't been touched in 2 years need some serious updating for the current version of Drupal. So even the code in logintoboggan that was already partially ported needs updating. drupal-check can help this process, but it's not meant to be a porting tool.

As far as the logintoboggan_rules submodule that I mentioned above, porting that is about 30 minutes of work, which includes adding test cases (there are currently no test cases at all for either this submodule or for the parent logintoboggan module). I'm willing to do that, but only after someone steps up as a maintainer so I know my work will get committed and not wasted. I'm also willing to post issues that need to be addressed for the D8 port, but again only if someone demonstrates they're listening and acting on these issues.

stevecowie’s picture

I finally found time to sort out the module for D8. As it was such a mess, I decided working by patches was going to take too long so I've done a complete re-work so we have a solid basis to work from. There is no new functionality but at least everything now works with D8 core.

What's now needed is for other people to test it to confirm that all its functionality is working. Also, patches are more than welcome for my rusty coding technique ;-)

There is one substantial change from the D7 module: namely, how the module handles new users, particularly when users set their own passwords. In D7, the approach was to remove the authenticated user role and to provide a temporary "untrusted" role. The way authenticated user role gets applied in D8 is significantly different as it's essentially hard-coded into core. I therefore switched the approach so that there's now a trusted role that gets applied once a user validates successfully. That feels more like working with the grain of core.

I'll now get on with writing automated tests, and also working out how which of the contrib sub-modules can be usefully ported to D8. On that point, I haven't done the Rules module, but as explained above, it's not actually an essential for LT to work.

I did wonder about breaking out the features into separate issues so that features can be tracked more systematically. On the other hand, might just slow things down. Any thoughts about the best way to do this are welcome.