Hi,

Is there plans to introduce D8 version of this module?

We would like to help you with development of this version or to implement it from scratch.

Thanks,

Snap_x

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

MegaChriz’s picture

I'm interested in a Drupal 8 version as well and I may be able to help with the development in a couple of months. I say "maybe" because I just started with learning the Drupal 8 API's.

serhiiy’s picture

Our team began developing a module for D8.

MegaChriz’s picture

@RomiOS-ID
Great! (If you meant with "a module" a D8 version of logintoboggan ;).)
Can you share the progress on the development so others have a chance to jump in or is it yet in a very experimental/exploring state ?

serhiiy’s picture

Right now our team is working on the module. Soon first patch will be posted.

stevecowie’s picture

I've also started working on this with md2 but we haven't started a branch as yet. Happy to look at a patch. Our intention is to re-work the admin interface in line with the responsive requirements for D8.

MegaChriz’s picture

Our intention is to re-work the admin interface

@stevecowie
Do you already have developed mock-ups or rough sketches for that?

serhiiy’s picture

Here is the first patch which implements the configuration page and pages for user validation. We want to continue development of version for Drupal 8. Can you please add me and ipo4ka704 (our team) as a (co-)maintainers?

MegaChriz’s picture

That's a big patch! At first glance, it looks well on it's way. I review just some parts of it that I had noticed.

  1. +++ b/logintoboggan.info.yml
    @@ -0,0 +1,6 @@
    +version: VERSION
    
    For modules hosted on drupal.org, the version number will be filled in by the packaging script, you should not specify it manually.

    See https://drupal.org/node/2000204

  2. +++ b/logintoboggan.info.yml
    @@ -0,0 +1,6 @@
    +configure: logintoboggan.config
    

    It looks like this should be configure: logintobogganform.settings according to the logintoboggan.routing.yml file.

  3. +++ b/logintoboggan.module
    @@ -559,12 +559,6 @@ function logintoboggan_user_login_validate($form, &$form_state) {
    -  }
    ...
    -  //Check to see whether our username matches any email address currently in the system.
    -  if($mail = db_query("SELECT mail FROM {users} WHERE LOWER(:name) = LOWER(mail)", array(
    -  ':name' => $form_state['values']['name'],
    -  ))->fetchField()) {
    -    form_set_error('name', t('This e-mail has already been taken by another user.'));
    

    I'm not sure why you deleted this.

  4. Although the configuration form looks exactly like the Drupal 7 version, it would be better to update the form to the Drupal user interface standards.

    If dual radiobuttons can be described in terms of true/false or enable/disable, use a stand-alone checkbox instead

    See https://drupal.org/node/387532

ipo4ka704’s picture

We made ​​changes to the patch according to your requests.
We want to continue development of version for Drupal 8. Can you please add me and RomiOS-ID (@InternetDevels team)as a (co-) maintainers?

ipo4ka704’s picture

Status: Active » Needs review
mamta.suri’s picture

Since there is a patch available, can this be made as D8 dev release or are there other plans for this module for D8? Thanks!

farald’s picture

+1 to a dev release :)

stevecowie’s picture

We're working on it, particularly md2, at the moment. We're aiming to get something launched by early March.

estoyausente’s picture

+1 to create a dev branch. It's imposible open bugs and debug all code. Please, create the dev branch and we can start to work propertly. Thanks!

stevecowie’s picture

We'll target next week to make a dev version available.

estoyausente’s picture

Great! Thanks! When it be done I will install it and test it properly, I want to use for a live product asap. :)

naveenvalecha’s picture

Thanks for your work! Here are couple of points that are needed to be addressed

  1. +++ b/config/logintoboggan.settings.yml
    @@ -0,0 +1,10 @@
    +unified_login: false
    +pre_auth_role: 2
    +redirect_on_confirm: false
    +override_destination_parameter: true
    +login_successful_message: false
    +minimum_password_length: false
    +login_with_email: false
    +confirm_email_at_registration: false
    +purge_unvalidated_user_interval: false
    +immediate_login_on_register: true
    

    Define the schema/metadata of the config.

  2. +++ b/lib/Drupal/logintoboggan/Access/LogintobogganReValidateAccess.php
    @@ -0,0 +1,36 @@
    +/**
    + * @file
    + * Contains \Drupal\logintoboggan\Access\LogintobogganReValidateAccess.
    + */
    

    Not needed.Remove it.

  3. +++ b/lib/Drupal/logintoboggan/Access/LogintobogganValidateAccess.php
    @@ -0,0 +1,33 @@
    +/**
    + * @file
    + * Contains \Drupal\logintoboggan\Access\LogintobogganValidateAccess.
    + */
    

    Not needed.Remove it.

  4. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +    $cur_account = \Drupal::currentUser();
    

    Inject the AccountInterface instead of static function call.

  5. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +    $pre_auth = !\Drupal::config('user.settings')->get('verify_mail')
    

    Inject the config factory.

  6. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +            drupal_set_message(t('Your account is currently blocked -- login cancelled.'), 'error');
    

    inject the transleration service as well.

  7. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +          return new RedirectResponse(\Drupal::url('user.edit', array('user' => $user)));
    

    use Url helper class instead of it.

  8. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +      $message = t("Sorry, you can only use your validation link once for security reasons.");
    

    use single quotes here instead of double quotes.

  9. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +      return new RedirectResponse(\Drupal::url($goto));
    

    same as above. use Drupal\Core\Url

  10. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +    $account = user_load($user);
    

    use Drupal\user\Entity\User::load()

  11. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +      drupal_set_message(t("A validation e-mail has been sent to the user's e-mail address."));
    

    use single quotes instead of double quotes.

  12. +++ b/lib/Drupal/logintoboggan/Controller/LogintobogganController.php
    @@ -0,0 +1,154 @@
    +    $account = \Drupal::currentUser();
    

    inject the Current Account service

  13. +++ b/lib/Drupal/logintoboggan/Form/LogintobogganSettingsForm.php
    @@ -0,0 +1,226 @@
    +/**
    + * @file
    + * Contains \Drupal\logintoboggan\Form\LogintobogganSettingsForm.
    + */
    

    Not needed.

  14. +++ b/lib/Drupal/logintoboggan/Form/LogintobogganSettingsForm.php
    @@ -0,0 +1,226 @@
    +// protected $roleStorage;
    +//   public function __construct(ModuleHandlerInterface $module_handler, RoleStorageControllerInterface $role_storage) {
    +//     $this->moduleHandler = $module_handler;
    +//     $this->roleStorage = $role_storage;
    +//   }
    

    Why commented code ?

  15. +++ b/lib/Drupal/logintoboggan/Form/LogintobogganSettingsForm.php
    @@ -0,0 +1,226 @@
    +  /**
    +   * Gets the roles to display in this form.
    +   *
    +   * @return \Drupal\user\RoleInterface[]
    +   *   An array of role objects.
    +   */
    

    is it needed ? I think no

  16. +++ b/lib/Drupal/logintoboggan/Form/LogintobogganSettingsForm.php
    @@ -0,0 +1,226 @@
    +  $config = $this->configFactory->get('logintoboggan.settings');
    

    don't call the parent trait function .directly use the $this->config(logintoboggan.settings)

  17. +++ b/lib/Drupal/logintoboggan/Form/LogintobogganSettingsForm.php
    @@ -0,0 +1,226 @@
    +    $help_text =  $this->t(" More help in writing the e-mail message can be found at <a href=\"!help\">LoginToboggan help</a>.", array('!help' => url('admin/help/logintoboggan')));
    

    Replace the url function with \Drupal\Core\Url function

  18. +++ b/logintoboggan.module
    @@ -668,44 +667,28 @@ function logintoboggan_menu() {
    +   $items['admin/config/system/logintoboggan'] = array(
    

    Move this to logintoboggan.routing file.

  19. +++ b/logintoboggan.module
    @@ -668,44 +667,28 @@ function logintoboggan_menu() {
    +  $items['user/validate/%user/%/%/%'] = array(
    

    Move this to logintoboggan.routing file.

  20. +++ b/logintoboggan.module
    @@ -1022,35 +956,25 @@ function _logintoboggan_process_validation($account) {
    +  return \Drupal::url('user.edit', array('user' => $account->id()));
    

    use \Drupal\Core\Url

  21. +++ b/logintoboggan.module
    @@ -1022,35 +956,25 @@ function _logintoboggan_process_validation($account) {
    +  return url('user/validate/' . $account->id() . '/' . REQUEST_TIME . '/' . logintoboggan_eml_rehash($account->getPassword(), REQUEST_TIME, $account->getEmail()), $url_options);
    

    use \Drupal\Core\Url

naveenvalecha’s picture

Status: Needs review » Needs work
chipway’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

Moved to 8.x-1.x-dev branch.

New Zeal’s picture

I'm currently developing logintoboggan for D8. There are a lot of fixes on the code which I downloaded early November 2016. I'll post a patch when we go live or if someone wants to add me to the maintainers that might be better.

Github repo is here: https://github.com/NewZeal/logintoboggan

manuel.adan’s picture

For the user's email verification feature, the email_confirmer module might be useful. It makes the hard work for any other module that needs email address confirmation as is the case with LoginToboggan.

axaios’s picture

Is there any update on the D8 version?

New Zeal’s picture

Clearly not much progress has been made upgrading logintoboggan to Drupal 8. This is just an alert that there is a repo for a logintoboggan upgrade here: https://github.com/NewZeal/logintoboggan if people would like to download and submit patches.

This module is currently on a production site, but not all features of logintoboggan have been upgraded and in the current implementation, some registration functions may be missing.

stevecowie’s picture

I'm finally back on the case and have made numerous updates to the logintoboggan.module. The settings form had various problems due to changes in how forms get built and urls get handled.

ajayg’s picture

@Setvecowie, @New Zeal
could you please share your updates as patches so we all can benefit from your changes?

stevecowie’s picture

We will do. We're hoping that by the end of next week we'll have made sufficient progress on our local branch to get patches published for the existing codebase. Keep chasing us!

New Zeal’s picture

FileSize
149.58 KB

Attached is a patch of the module I have been using against the latest download.

kclarkson’s picture

@New Zeal @SteveCowie and @md2,

I am looking through the issue queue and am a little confused as to where I am supposed to go and post issues and test patches.

Do we have a workable Dev Branch for 8.x?

Also if the work is being done on GitHub can you set it up to mirror GitHub?

Then maybe update the main page to give users an idea of where or what they are supposed to do. Would be extremely grateful :)

Here is an example of how some projects are doing it: https://www.drupal.org/project/rules or https://www.drupal.org/project/rng