get("accounts", ["[>]authkeys" => ["accountid"]], ["accounts.accountid","name", "bio"], ["key" => $VARS["key"]]); if (!empty($VARS["name"])) { if (strlen($VARS["name"]) > 200) { sendJsonResp($Strings->get("Name is too long (max 200 characters)."), "ERROR"); } $profile["name"] = htmlentities($VARS["name"]); } if (!empty($VARS["bio"])) { $profile["bio"] = htmlentities($VARS["bio"]); } $database->update("accounts", [ "name" => $profile["name"], "bio" => $profile["bio"], ], ["accountid" => $profile["accountid"]]); sendJsonResp();