CVS edit link for YesCT

I wrote a small module to list accounts that may have duplicate emails. Usually it is not possible to create accounts which have an email already in use in another account, but there are a few situations where this can happen: if using a module that turns off that verification check and allows using an email address in more than one account, or if using the migrate module to create accounts, it will create accounts with duplicate emails.

When in a situation where your site has accounts with duplicate emails, it can be hard to track those down to evaluate if it really is OK that they have duplicates, or to fix the problem. I found myself in the situation of using migrate module to mass create accounts based on a csv file import, and after the import, I needed a way to list all the accounts that use the same email address. I first looked for a module to do this, did not find one, then wrote it.

I posted in groups.drupal.org group: Contributed Module Ideas
to get an idea if this would be worth contibuting to d.o:
http://groups.drupal.org/node/62753

I got one yes, and no no's.

This module does two things:
1) has a block to display system wide duplicate email addresses
in user accounts, and
2) has a view with a block display for use on individual user
account pages that displays only the accounts that have the same email address as that account.

I expect this module will be used typically by people enabling it, tracking down their duplicates and evaluating them, and then disabling it after they fix what might be needed to be fixed. (Kind of like a devel module.)

Comments

yesct’s picture

StatusFileSize
new3.97 KB

the module is attached.

yesct’s picture

StatusFileSize
new54.67 KB
new47.21 KB

screen shots, one on a site with no accounts with duplicate emails, and one on a site with 2 duplicates: 1 where 2 accounts have the same email, and another where 3 accounts have the same email.

yesct’s picture

Status: Postponed (maintainer needs more info) » Needs review
avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

Does Drupal allow to create accounts sharing the same email address? As far as I know, it's not possible to use the same email address for different accounts on Drupal; as a matter of fact, it is not possible on drupal.org.

yesct’s picture

Status: Needs work » Needs review

Yes, some strange situations allow duplicate emails:
creating users using migrate module
http://drupal.org/project/sharedemail
and I suppose other strange ways people might edit the database directly bypassing validation checks.

I'm not saying people should do that! But if for some reason they find themselves with accounts using same emails, this module will help them find all of them.

This should be needs review, right?

avpaderno’s picture

Status: Needs review » Needs work
  1. See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be written, and how the function names should be prefixed.
  2. To create links, the code should use url(), or l().
yesct’s picture

Status: Needs work » Needs review
StatusFileSize
new3.95 KB

thanks. I fixed those things (and a few others I found with some help of people in irc). Used coder module too. New version attached.

avpaderno’s picture

Status: Needs review » 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.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

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

avpaderno’s picture

Component: Miscellaneous » new project application
Assigned: Unassigned » avpaderno
Issue summary: View changes