Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Existing user ID for e-mail address check

Quote Reply
Existing user ID for e-mail address check
Anybody interested in doing something that will check for existing user IDs tied to an e-mail address of a new registration attempt?

It's a pretty basic feature but one that's not in play here yet.

Ideally it would pop up a message saying something like:


User JohnDoe is already registered with e-mail address, johndoe@smith.com. Would you like us to e-mail you a temporary password for user ID "JohnDoe"?

If you are not JohnDoe at johndoe@smith.com, please click here.



Or something like that. I've apparently got a lot users who can't remember they signed up once...or maybe they can't remember their exact user ID so they create a new one.

Help me Obi wan,
Quote Reply
Re: [HeavyBombers] Existing user ID for e-mail address check In reply to
Hi,

I'll do this tommorrow if you can wait that long :)
Quote Reply
Re: [Paul] Existing user ID for e-mail address check In reply to
That would be great Paul. That ought to be one feature/plug-in that Gossamer incorporates once they get a look at what you come up with Cool
Quote Reply
Re: [HeavyBombers] Existing user ID for e-mail address check In reply to
Ok well I guess mine will be a temporary plugin :)
Quote Reply
Re: [Paul] Existing user ID for e-mail address check In reply to
Paul,

You're so great! Wink I'll be waiting too for this plugin. Thank you in advance!

François Smile
Quote Reply
Re: [Paul] Existing user ID for e-mail address check In reply to
Paul,

How goes the development of your plugin? I'm still waiting for! Smile

Thank you!

François
Quote Reply
Re: [Army Air Forces] Existing user ID for e-mail address check In reply to
Here's hoping that 1.1.6 will check against existing accounts with same e-mail address, base all user "assistance" on the e-mail address instead of the user name, and require double entry of e-mail address to check that they've entered it correctly.

I agree with whoever wrote that users will forget user names, but rarely forget their e-mail address.

I find this issue getting to be more problematic as my user base grows.

Or if not forthcoming in Gforum, a nice plugin Wink
Quote Reply
Re: [Army Air Forces] Existing user ID for e-mail address check In reply to
+1 vote for your suggestions!!

See:

François Wink
Quote Reply
Re: [Franco] Existing user ID for e-mail address check In reply to
See the last post, there is always one or two extra lines (returns char) that appears after a unordered list. I think this lines should not be there.

François
Quote Reply
Re: [Franco] Existing user ID for e-mail address check In reply to
I spent some time today looking at the code. If you use how user names are treated and tested for duplicates as your guide - the process should be simple. There does not appear to be an if/then series to rule out people from using the same user names. Rather, it is handled from the database. You will notice that the value for user_name is limited to unique values. By making the user_email field a unique variable, it will then limit users to haveing one account registered to any one e-mail address.

THIS IS NOT A FIX - BUT RATHER A START

Now - I tried this, but found that if you have offenders already in the system - you can not use this method to fix the problem. The database will return an error with the first offender notifying you that there are duplicate entries in the db.

If you do not have offenders - you can do it, but when you enter this - here is the error message your user gets when they try to register with a dulpicate:

A fatal error has occurred:


Failed to execute query: 'INSERT INTO gforum_User (user_last_logon,user_title,user_password,user_enabled,user_template,user_status,user_val_code,
user_registered,user_admin_validated,user_username,user_email,user_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,NULL)' Reason: Duplicate entry 'duplicate@somedomain.com' for key 2 at GForum::User::signup_submit line 352.




Please enable debugging in setup for more details.



I am trying to identify how the error messaging works - if I get it, I will post. I think this is a needed feature and hopefully someone more knowlegable than this newbie can look at it and identify a SIMPLE fix.

Last edited by:

shiner: Jun 7, 2002, 8:04 AM
Quote Reply
Re: [shiner] Existing user ID for e-mail address check In reply to
ok - the answer seems to lie in admin/gforum/user.pm - in the subroutine 'signup'

one needs to create a language variable similar to this:

USER_EMAIL_EXISTS

Message:
This e-mail address ('%s') already exists for another account. Rather than creating a new account, please request a temporary password under your old account. To do this, enter your old user name and click on "Lost my password." If you entered this e-mail account by error, please enter the correct address and try again.

A coding guru could figure out how to make it say:

"This e-mail address ('%s') is currently being used by <%user_name%> and can not be used for any other accounts. If this is your correct e-mail address - please do not create a new account. Instead, we ask that you request a temporary password under your <%user_name%> account. To do this, click on "Lost my password" and enter <%user_name%>. A new password will be sent to the e-mail address listed on the account. If you entered this e-mail account by error, please enter the correct address and try again."

That is far as I can get - I simply don't know how to code it.

Last edited by:

shiner: Jun 7, 2002, 8:17 AM
Quote Reply
Re: [shiner] Existing user ID for e-mail address check In reply to
In GForum/User.pm just under
Code:
$ut->count(user_username => $input->{user_username})
and return GForum::do_func(user_signup => GForum::language(USERNAME_EXISTS => $input->{user_username}));
add
Code:
$ut->count(user_email => $input->{user_email})
and return GForum::do_func(user_signup => GForum::language(USER_EMAIL_EXISTS => $input->{user_email}));
This seems to be working. You also have to add the language variable USER_EMAIL_EXISTS, as you pointed out.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Existing user ID for e-mail address check In reply to
Yogi - that works like a charm! Thank you for your time!!!
Quote Reply
Re: [yogi] Existing user ID for e-mail address check In reply to
I finally got around to clearing duplicate e-mail accounts out of my user base (900+ members and growing might I add).

What am I doing wrong here? I successfully added the code bit to user.pm, and it does detect duplicate e-mail sign-ups. But the error message I'm generating is all wrong.

Attached is what I'm getting, any help appreciated.

It looks like it doesn't want to output the text from Language Var, that I created. Under "USER", USER_EMAIL_EXISTS "This e-mail address '%s' is already in use by user: <%user_name%>."

Should it be under SIGNUP? Language Vars are something I know nothing about (amongst other things).

Help?

Last edited by:

ArmyAirForces: Jul 1, 2002, 9:07 AM
Quote Reply
Re: [ArmyAirForces] Existing user ID for e-mail address check In reply to
Hep me obi wan...
Quote Reply
Re: [ArmyAirForces] Existing user ID for e-mail address check In reply to
I don't think you can put a tag (i.e. <%user_username%>) in a language var.

Are you sure that you added the language var for the right template set?

Ivan
-----
Iyengar Yoga Resources / GT Plugins

Last edited by:

yogi: Jul 1, 2002, 11:39 PM
Quote Reply
Re: [yogi] Existing user ID for e-mail address check In reply to
Yogi,

I removed the tag to no effect, and I'm adding the language var in the "Default" template set.

Think I'll shoot a note over to Jason and see if he can't offer a suggestion.