Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Zendesk_Zendesk_Model_Api_Requesters extends Zendesk_Zendesk_Model_Api_Use
{
public function create($email, $name = null)
{
if(!Zend_Validate::is($email, 'EmailAddress')) {
if(!Zend_Validate::is($email, 'EmailAddress', array('domain' => false))) {
throw new InvalidArgumentException('Invalid email address provided');
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/code/community/Zendesk/Zendesk/Model/Api/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Zendesk_Zendesk_Model_Api_Users extends Zendesk_Zendesk_Model_Api_Abstract
{
public function find($email)
{
if(!Zend_Validate::is($email, 'EmailAddress')) {
if(!Zend_Validate::is($email, 'EmailAddress', array('domain' => false))) {
throw new InvalidArgumentException('Invalid email address provided');
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/code/community/Zendesk/Zendesk/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function saveConfig(Varien_Event_Observer $observer)
// If the email is already set, then do nothing
if($currentEmail !== $zendeskEmail) {
// Ensure the email address value exists and is valid
if(Zend_Validate::is($zendeskEmail, 'EmailAddress')) {
if(Zend_Validate::is($zendeskEmail, 'EmailAddress', array('domain' => false))) {
Mage::getModel('core/config')->saveConfig('zendesk/hidden/contact_email_old', $currentEmail, $scope, $scopeId);
Mage::getModel('core/config')->saveConfig('contacts/email/recipient_email', $zendeskEmail, $scope, $scopeId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public function finaliseAction()
// If the email is already set, then do nothing
if($currentEmail !== $zendeskEmail) {
// Ensure the email address value exists and is valid
if(Zend_Validate::is($zendeskEmail, 'EmailAddress')) {
if(Zend_Validate::is($zendeskEmail, 'EmailAddress', array('domain' => false))) {
Mage::getModel('core/config')->saveConfig('zendesk/hidden/contact_email_old', $currentEmail);
Mage::getModel('core/config')->saveConfig('contacts/email/recipient_email', $zendeskEmail);
}
Expand Down