Minahito
minah****@users*****
2006年 8月 27日 (日) 01:50:27 JST
Index: xoops2jp/html/modules/user/forms/EditUserForm.class.php diff -u xoops2jp/html/modules/user/forms/EditUserForm.class.php:1.1.2.15 xoops2jp/html/modules/user/forms/EditUserForm.class.php:1.1.2.16 --- xoops2jp/html/modules/user/forms/EditUserForm.class.php:1.1.2.15 Sun Aug 27 01:44:50 2006 +++ xoops2jp/html/modules/user/forms/EditUserForm.class.php Sun Aug 27 01:50:27 2006 @@ -148,17 +148,6 @@ $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.10 xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.11 --- xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.10 Sun Aug 27 01:44:50 2006 +++ xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php Sun Aug 27 01:50:27 2006 @@ -74,28 +74,6 @@ $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) { } Index: xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php diff -u xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.10 xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.11 --- xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.10 Sat Aug 19 21:54:21 2006 +++ xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php Sun Aug 27 01:50:27 2006 @@ -56,14 +56,26 @@ // // Check bad uname patterns. // - foreach(explode("|",$this->mConfig['bad_unames']) as $pattern) { - if(!empty($pattern)&&preg_match("/".$pattern."/i",$this->get('uname'))) { + foreach($this->mConfig['bad_unames'] as $t_uname) { + if(!empty($t_uname) && preg_match("/${t_uname}/i", $this->get('uname'))) { $this->addErrorMessage(_MD_USER_LANG_NAMERESERVED); break; } } } } + + function validateEmail() + { + if (strlen($this->get('email')) > 0) { + 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; + } + } + } + } function validateTimezone_offset() {