[xoops-cvslog 4738] CVS update: xoops2jp/html/modules/user/forms

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 10月 2日 (月) 22:24:49 JST


Index: xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php
diff -u xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.11 xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.12
--- xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.11	Sun Aug 27 01:50:27 2006
+++ xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php	Mon Oct  2 22:24:49 2006
@@ -25,7 +25,7 @@
 			//
 			$userHandler=&xoops_gethandler('user');
 			$criteria =& new CriteriaCompo(new Criteria('uname', $this->get('uname')));
-			if ($this->get('uid')) {
+			if ($this->get('uid') > 0) {
 				$criteria->add(new Criteria('uid', $this->get('uid'), '<>'));
 			}
 			if ($userHandler->getCount($criteria) > 0) {
@@ -71,9 +71,21 @@
 			foreach ($this->mConfig['bad_emails'] as $t_email) {
 				if (!empty($t_email) && preg_match("/${t_email}/i", $this->get('email'))) {
 					$this->addErrorMessage(_MD_USER_ERROR_INVALID_EMAIL);
-					break;
+					return;
 				}
 			}
+			
+			//
+			// email unique check
+			//
+			$userHandler=&xoops_gethandler('user');
+			$criteria =& new CriteriaCompo(new Criteria('email', $this->get('email')));
+			if ($this->get('uid') > 0) {
+				$criteria->add(new Criteria('uid', $this->get('uid'), '<>'));
+			}
+			if ($userHandler->getCount($criteria) > 0) {
+				$this->addErrorMessage(_MD_USER_ERROR_EMAILTAKEN);
+			}
 		}
 	}
 


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index