Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.6
-
Fix Version/s: None
-
Component/s: Administration
-
Labels:None
-
Environment:Moodle 1.6
-
Affected Branches:MOODLE_16_STABLE
Description
Students who have an email address with a dot just before the at-sign, cannot signup.
Here is a world example:
hong-kong-man...@r.vodafone.ne.jp
This is because the regular expression used in the "validate_email" function in "lib/weblib.php" considers such addresses as "invalid".
Suggested solution:
================
Modify the "validate_email" function to the following:
function validate_email($address) {
return (ereg('^[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~.]+'.
'@'.
'[-!#$%&\'*+
/0-9=?A-Z^_`a-z{|}~]+\.'.
'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',
$address));
}
http://en.wikipedia.org/wiki/E-mail_address
According to RFC 2822: The character . provided that it is not the first nor last character in the local-part, nor may it appear two or more times consecutively.
My +1 to keep the test as is.