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

Back to archive index

Minahito minah****@users*****
2006年 10月 4日 (水) 14:11:46 JST


Index: xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php
diff -u xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php:1.1.2.17 xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php:1.1.2.18
--- xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php:1.1.2.17	Tue Oct  3 14:39:50 2006
+++ xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php	Wed Oct  4 14:11:46 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package user
- * @version $Id: UserAdminEditForm.class.php,v 1.1.2.17 2006/10/03 05:39:50 minahito Exp $
+ * @version $Id: UserAdminEditForm.class.php,v 1.1.2.18 2006/10/04 05:11:46 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -187,6 +187,23 @@
 		}
 	}
 	
+	function validateEmail()
+	{
+		if (strlen($this->get('email')) > 0) {
+			//
+			// 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);
+			}
+		}
+	}
+	
 	function validateUrl()
 	{
 		$t_url = $this->get('url');


xoops-cvslog メーリングリストの案内
Back to archive index