| 29 |
header("Content-Type:application/json; charset=utf-8"); |
header("Content-Type:application/json; charset=utf-8"); |
| 30 |
|
|
| 31 |
// Validate input data |
// Validate input data |
| 32 |
|
if (!preg_match("/^[A-Za-z][A-Za-z0-9]{2,11}$/", $username)) |
|
if (!preg_match("/^[A-Za-z][A-Za-z0-9]{4,11}$/", $username)) |
|
| 33 |
{ |
{ |
| 34 |
$result_set["return"]["code"] = -1; |
$result_set["return"]["code"] = -1; |
| 35 |
array_push($result_set["return"]["errorFields"], array( |
array_push($result_set["return"]["errorFields"], array( |
| 49 |
|
|
| 50 |
if ($ch_passwd) |
if ($ch_passwd) |
| 51 |
{ |
{ |
| 52 |
if (!preg_match("/^[A-Za-z0-9]{5,12}$/", $password_new)) |
if (!preg_match("/^[A-Za-z0-9]{6,12}$/", $password_new)) |
| 53 |
{ |
{ |
| 54 |
$result_set["return"]["code"] = -1; |
$result_set["return"]["code"] = -1; |
| 55 |
array_push($result_set["return"]["errorFields"], array( |
array_push($result_set["return"]["errorFields"], array( |