From afbab7b3c6cc2f8ab2904c4b81c2c04413fff644 Mon Sep 17 00:00:00 2001 From: Arctic Code Date: Fri, 26 Jul 2013 23:21:29 -0500 Subject: [PATCH] Correct sql for register API user New API users can now be created - Test sucessful --- api.backend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.backend.php b/api.backend.php index 198289b..0bf45f9 100644 --- a/api.backend.php +++ b/api.backend.php @@ -323,7 +323,7 @@ class api{ $reg = $perms[2]; $api = $perms[3]; - $sql = "INSERT INTO `users` (name, key, short, image, reg, api, email, resetkey) VALUES('$appname', '$key', '$short', '$image', '$reg', '$api', '$email', '$resetkey')"; + $sql = "INSERT INTO `users` (`name`, `key`, `short`, `image`, `reg`, `api`, `email`, `resetkey`) VALUES ('$appname', '$key', '$short', '$image', '$reg', '$api', '$email', '$resetkey')"; if(!$result = $apidb->query($sql)) return 'ERROR: ['.$apidb->error.']'; return "Registered $appname for API use. Key: $key - ResetKey: $resetkey"; }