Add user_id = local_channel() to the where clause of updates
This commit is contained in:
parent
48e74035f2
commit
e587fe5ce8
@ -45,14 +45,15 @@ class Oauth2 {
|
|||||||
grant_types = '%s',
|
grant_types = '%s',
|
||||||
scope = '%s',
|
scope = '%s',
|
||||||
user_id = %d
|
user_id = %d
|
||||||
WHERE client_id='%s'",
|
WHERE client_id='%s' and user_id = %s",
|
||||||
dbesc($name),
|
dbesc($name),
|
||||||
dbesc($secret),
|
dbesc($secret),
|
||||||
dbesc($redirect),
|
dbesc($redirect),
|
||||||
dbesc($grant),
|
dbesc($grant),
|
||||||
dbesc($scope),
|
dbesc($scope),
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc($name));
|
dbesc($name),
|
||||||
|
intval(local_channel()));
|
||||||
} else {
|
} else {
|
||||||
$r = q("INSERT INTO oauth_clients (client_id, client_secret, redirect_uri, grant_types, scope, user_id)
|
$r = q("INSERT INTO oauth_clients (client_id, client_secret, redirect_uri, grant_types, scope, user_id)
|
||||||
VALUES ('%s','%s','%s','%s','%s',%d)",
|
VALUES ('%s','%s','%s','%s','%s',%d)",
|
||||||
|
Reference in New Issue
Block a user