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

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 8月 27日 (日) 01:44:50 JST


Index: xoops2jp/html/modules/user/forms/EditUserForm.class.php
diff -u xoops2jp/html/modules/user/forms/EditUserForm.class.php:1.1.2.14 xoops2jp/html/modules/user/forms/EditUserForm.class.php:1.1.2.15
--- xoops2jp/html/modules/user/forms/EditUserForm.class.php:1.1.2.14	Sat Aug 19 20:55:57 2006
+++ xoops2jp/html/modules/user/forms/EditUserForm.class.php	Sun Aug 27 01:44:50 2006
@@ -148,6 +148,17 @@
 		$this->mFieldProperties['user_intrest']->addVar('maxlength', 150);
 	}
 	
+	function validateEmail()
+	{
+		if (strlen($this->get('email')) > 0) {
+			foreach ($this->mConfig['bad_emails'] as $t_email) {
+				if (preg_match("/${t_email}/i", $this->get('email'))) {
+					$this->addErrorMessage(_MD_USER_ERROR_INVALID_EMAIL);
+				}
+			}
+		}
+	}
+	
 	function load(&$obj)
 	{
 		$this->set('uid', $obj->get('uid'));
Index: xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php
diff -u xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.9 xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.10
--- xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.9	Sat Aug 19 21:01:54 2006
+++ xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php	Sun Aug 27 01:44:50 2006
@@ -74,6 +74,28 @@
 		$this->mFieldProperties['timezone_offset']->addMessage('required', _MD_USER_ERROR_REQUIRED, _MD_USER_LANG_TIMEZONE_OFFSET);
 	}
 
+	function validateUname()
+	{
+		if (strlen($this->get('uname')) > 0) {
+			foreach ($this->mConfig['bad_unames'] as $t_uname) {
+				if (preg_match("/${t_uname}/i", $this->get('uname'))) {
+					$this->addErrorMessage(_MD_USER_ERROR_NAME_RESERVED);
+				}
+			}
+		}
+	}
+	
+	function validateEmail()
+	{
+		if (strlen($this->get('email')) > 0) {
+			foreach ($this->mConfig['bad_emails'] as $t_email) {
+				if (preg_match("/${t_email}/i", $this->get('email'))) {
+					$this->addErrorMessage(_MD_USER_ERROR_INVALID_EMAIL);
+				}
+			}
+		}
+	}
+	
 	function load(&$obj)
 	{
 	}


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る