aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings/Oauth2.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Settings/Oauth2.php')
-rw-r--r--Zotlabs/Module/Settings/Oauth2.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Settings/Oauth2.php b/Zotlabs/Module/Settings/Oauth2.php
index 985095115..52da20598 100644
--- a/Zotlabs/Module/Settings/Oauth2.php
+++ b/Zotlabs/Module/Settings/Oauth2.php
@@ -45,14 +45,15 @@ class Oauth2 {
grant_types = '%s',
scope = '%s',
user_id = %d
- WHERE client_id='%s'",
+ WHERE client_id='%s' and user_id = %s",
dbesc($name),
dbesc($secret),
dbesc($redirect),
dbesc($grant),
dbesc($scope),
intval(local_channel()),
- dbesc($name));
+ dbesc($name),
+ intval(local_channel()));
} else {
$r = q("INSERT INTO oauth_clients (client_id, client_secret, redirect_uri, grant_types, scope, user_id)
VALUES ('%s','%s','%s','%s','%s',%d)",