mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
ID, 닉네임 등에서 공백을 제거할 때 유니코드 공백문자 및 컨트롤문자도 제거하도록 고침
This commit is contained in:
parent
6657f73850
commit
115cf95ac7
1 changed files with 4 additions and 6 deletions
|
|
@ -321,13 +321,12 @@ class memberController extends member
|
||||||
$args->extra_vars = serialize($extra_vars);
|
$args->extra_vars = serialize($extra_vars);
|
||||||
|
|
||||||
// remove whitespace
|
// remove whitespace
|
||||||
$checkInfos = array('user_id', 'nick_name', 'email_address');
|
$checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address');
|
||||||
$replaceStr = array("\r\n", "\r", "\n", " ", "\t", "\xC2\xAD");
|
|
||||||
foreach($checkInfos as $val)
|
foreach($checkInfos as $val)
|
||||||
{
|
{
|
||||||
if(isset($args->{$val}))
|
if(isset($args->{$val}))
|
||||||
{
|
{
|
||||||
$args->{$val} = str_replace($replaceStr, '', $args->{$val});
|
$args->{$val} = preg_replace('/[\pZ\pC]+/', '', $$args->{$val});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$output = $this->insertMember($args);
|
$output = $this->insertMember($args);
|
||||||
|
|
@ -534,13 +533,12 @@ class memberController extends member
|
||||||
$args->extra_vars = serialize($extra_vars);
|
$args->extra_vars = serialize($extra_vars);
|
||||||
|
|
||||||
// remove whitespace
|
// remove whitespace
|
||||||
$checkInfos = array('user_id', 'nick_name', 'email_address');
|
$checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address');
|
||||||
$replaceStr = array("\r\n", "\r", "\n", " ", "\t", "\xC2\xAD");
|
|
||||||
foreach($checkInfos as $val)
|
foreach($checkInfos as $val)
|
||||||
{
|
{
|
||||||
if(isset($args->{$val}))
|
if(isset($args->{$val}))
|
||||||
{
|
{
|
||||||
$args->{$val} = str_replace($replaceStr, '', $args->{$val});
|
$args->{$val} = preg_replace('/[\pZ\pC]+/', '', $$args->{$val});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue