The Multi Step Login module offers following features and usability improvements

1>First form checks user is already registered in site or not using email or username.
If user is already registered then login form will come otherwise user will redirected to user register form.

2>In second form user can login with email id or username.

- Multi Step Login module path is multi-step-form.Example: example.com/multi-step-form

Project link

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

Git instructions

git clone --branch 8.x-1.x https://git.drupal.org/project/mutli_step_login.git

Comments

bsumit5577 created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes

I corrected the Git instructions.

lawsands’s picture

Hi bsumit,

Please fix the pareview errors reported
Will do a manual review in some time.

https://pareview.sh/pareview/https-git.drupal.org-project-mutli_step_log...

sumit-k’s picture

Hi Lawsands,

I fixed pareview errors.Please Check.

sumit-k’s picture

Thanks kiamlaluno for correction.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community

I have manually check your code. Looking Good
I also gone through pareview , all coding standard issues are fixed.
Good work .

sumit-k’s picture

Thanks Keshav for reviews.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +PAreview: security
      global $base_url;
      $form['name']['#title'] = t('Username or Email');
      $form['pass']['#description'] = t('Enter the password that accompanies your username. <a href="@password">Forgot password?</a>', ['@password' => $base_url . '/user/password']);

That is not how a link is created. See the code used for the login block.

      $tempstore = \Drupal::service('user.private_tempstore')->get('multi_step');
      $data = $tempstore->get('combovalue');
      if (strpos($data, "@") == TRUE) {
        $form['account']['mail']['#default_value'] = $data;
      }
      else {
        $form['account']['name']['#default_value'] = $data;
      }

The user.private_tempstore service is deprecated and replaced by the tempstore.private service. The code doesn't check the value returned from $tempstore->get('combovalue').

  $query = \Drupal::database()->select('users_field_data', 'u');
  $query->fields('u', ['name']);
  $query->condition('u.name', $value, '=');
  $results = $query->execute()->fetchAssoc();

There is no need to directly access the database to check a user account exists. That is not what Drupal core does.

    if (!$results) {
      $exist = FALSE;
    }
    else {
      $exist = TRUE;
    }
    return $exist;

That code can be reduced to a single line.

The code in src/Form/MultiStepForm.php, if it aims to replace the login code used from Drupal core, it's too minimalist. It doesn't do many of the checks Drupal core does, with the consequence, for example, of not stopping users who keep trying to log in.

sumit-k’s picture

HI kiamlaluno ,

I have solved following mentioned issues.Please check.

sumit-k’s picture

Status: Needs work » Needs review
manish34jain’s picture

StatusFileSize
new139.41 KB

Hi bsumit,

I have install on simplytest.me https://df6mj.ply.st/admin/reports/dblog/event/47
and its showing notice.

Notice: Undefined variable: output in multi_step_help() (line 45 of /home/df6mj/www/modules/mutli_step_login/multi_step.module)
check screenshot.

Thanks

avpaderno’s picture

To see the log directly on the simplytest.me site, you need to log in using admin as username and password. It will be accessible until the site isn't destroyed from simplytest.me.

manish34jain’s picture

StatusFileSize
new608 bytes

Hi bsumit,

use this and check.

Thanks

sumit-k’s picture

Hi manish,

Thanks for patch.I fixed all notices and warnings.Please review.

manish34jain’s picture

Hello bsumit,

Now it's working fine.

Thanks

girishpanchal07’s picture

@bsumit5577,

still, I got some warnings and errors from automatic testing tools (Pareview.sh).

https://pareview.sh/pareview/https-git.drupal.org-project-mutli_step_log...

Please fix these issues.

Thanks.

sumit-k’s picture

Hi girishpanchal,

Pareview.sh notices and warnings are fixed.please check.

girishpanchal07’s picture

Status: Needs review » Reviewed & tested by the community

Hi, bsumit5577,

I think you should make your module user login interface same as like drupal login interface(http://prntscr.com/k7zrto).

This is a suggestion for you.

Thanks.

avpaderno’s picture

As side note, $user->getDisplayName() doesn't return the username, but the name to show in pages instead of the username. By default, Drupal core returns the same value returned for the username, but any third-party module can change that.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

sumit-k’s picture

Thank you very much kiamlaluno and all reviewers for reviews. I am grateful to all of you.Sure, i will follow your guidelines.

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.