API_USER::api_chkname PHP Method

api_chkname() public method

api_chkname function.
public api_chkname ( ) : void
return void
    function api_chkname()
    {
        $this->app_check("get");
        $_arr_userName = $this->mdl_user->input_chk_name();
        if ($_arr_userName["alert"] != "ok") {
            $this->obj_api->halt_re($_arr_userName);
        }
        $_arr_userName["act_get"] = $GLOBALS["act_get"];
        if (!$this->obj_sign->sign_check(array_merge($this->appRequest, $_arr_userName), $this->appRequest["signature"])) {
            $_arr_return = array("alert" => "x050403");
            $this->obj_api->halt_re($_arr_return);
        }
        $_arr_userRow = $this->mdl_user->mdl_read_api($_arr_userName["user_name"], "user_name");
        if ($_arr_userRow["alert"] == "y010102") {
            $_str_alert = "x010205";
        } else {
            $_str_alert = "y010205";
        }
        $_arr_return = array("alert" => $_str_alert);
        $this->obj_api->halt_re($_arr_return);
    }

Usage Example

Beispiel #1
0
        $api_user->api_edit();
        break;
    case "mailbox":
        $api_user->api_mailbox();
        break;
    case "nomail":
        $api_user->api_nomail();
        break;
    case "forgot":
        $api_user->api_forgot();
        break;
    case "del":
        $api_user->api_del();
        break;
    default:
        switch ($GLOBALS["act_get"]) {
            case "get":
            case "read":
                $api_user->api_read();
                break;
            case "chkname":
            case "check_name":
                $api_user->api_chkname();
                break;
            case "chkmail":
            case "check_mail":
                $api_user->api_chkmail();
                break;
        }
        break;
}