Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: e-mail validation
Pages: [1]   Go Down
  Print  
Author Topic: e-mail validation  (Read 10804 times)
0 Members and 1 Guest are viewing this topic.
luisraposo
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« on: July 14, 2009, 17:56:50 »

hello,
for unregistered users, filling e-mail address can be mandatory, ok
what happens is that the address is not validated..  Sad
is this planned to be fixed on the next release?
regards,
luis
« Last Edit: July 30, 2009, 08:36:31 by luisraposo » Logged
luisraposo
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #1 on: July 30, 2009, 08:29:07 »

hi,
I thought this was important, in order to have responsible comments.

I'm not sure is there can be a fail-safe-check for e-mail addresses.. even because some mail servers accept messages to non-existent addresses!

Community Builder implements a mail check function when registering, so I started digging from there :p

The standard Joomla! PHPmailer library has the needed functions for checking, and the JMail class returns a conveniently filled mail structure.. so..  Smiley

You may try this 2step approach to get the e-mail address validated  Grin

1. extract http://www.kotasbiketeam.org/tmp/email-check.zip to your JComments folder (\components\com_jcomments\)

2. edit \components\com_jcomments\jcomments.ajax.php ~line 150
Code:
/*
} else if (!empty($values['email']) && (!preg_match( _JC_REGEXP_EMAIL2, $values['email']))) {
JCommentsAJAX::showErrorMessage($response, 'email', JText::_('ERROR_INCORRECT_EMAIL'));
*/
} else if (!empty($values['email'])) {
if (! is_file(JCOMMENTS_BASE.DS . 'email-check.php')) {
if (! preg_match( _JC_REGEXP_EMAIL2, $values['email']))
JCommentsAJAX::showErrorMessage($response, 'email', JText::_('ERROR_INCORRECT_EMAIL'));
} else {
require_once (JCOMMENTS_BASE.DS . 'email-check.php');
if (emailCheck($values['email']) == 1) {
$noErrors = true;
} else {
JCommentsAJAX::showErrorMessage($response, 'email', JText::_('ERROR_INCORRECT_EMAIL'));
}
}

} else if ...


Let me know if it worked, you may use it as you wish Wink

regards,
luis raposo
« Last Edit: July 30, 2009, 08:37:13 by luisraposo » Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Suggestions, Wishlists & Feature Requests    Topic: e-mail validation
 
Jump to: