VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: kywolf on November 10, 2008, 21:44:47 PM

Title: Valid e-mail addresses are being blocked
Post by: kywolf on November 10, 2008, 21:44:47 PM
I've read a few posts about this but decent answers have been given.  If a person has an e-mail address with a '-' in it, they are prevented from registering with the site.

However, if I create the account from the admin area there are no problems at all.  They can login and make purchases without any interruption.

An example is:  address@your-email.com

Because of the - it would not be accepted during front-end registration but I could create the account from admin area.  Why would they set it up like this in the first place?  Joomla does not seem to mind regardless of what others claim.

How can I remove this restriction so anyone with an e-mail address can register?

An actual response would be fantastic.
Title: Re: Valid e-mail addresses are being blocked
Post by: Patrick@M4 on November 27, 2008, 09:29:44 AM
I sent mine to silent registration then changed the SQL statement in includes/joomla.php to check the "username" against the email address like so:

This is around line 1083:

// query used for login via login module
$query = "SELECT id, name, username, password, usertype, block, gid"
. "\n FROM #__users"
. "\n WHERE email = ". $this->_db->Quote( $username ) //updated so it check email not username
;


Where it says "WHERE email" this used to be "WHERE username"

All your doing is leaving everything in the system as it but changing the query that check the user account.

(This is JM 1.0.15 / VM 1.0.15)