Add user_id = local_channel() to the where clause of updates

This commit is contained in:
M.Dent 2018-08-10 12:44:57 -04:00 committed by DM42.Net (Matt Dent)
parent 48e74035f2
commit e587fe5ce8

View file

@ -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)",