Skip to content

Commit 23c336f

Browse files
author
Fosco Marotto
committed
Added useMasterKey param to ParseObject::fetch
1 parent 64f3f0f commit 23c336f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Parse/ParseObject.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,11 @@ public static function create($className, $objectId = null,
462462
/**
463463
* Fetch the whole object from the server and update the local object.
464464
*
465+
* @param bool $useMasterKey Whether to use the master key and override ACLs
466+
*
465467
* @return null
466468
*/
467-
public function fetch()
469+
public function fetch($useMasterKey = false)
468470
{
469471
$sessionToken = null;
470472
if (ParseUser::getCurrentUser()) {
@@ -473,7 +475,7 @@ public function fetch()
473475
$response = ParseClient::_request(
474476
'GET',
475477
'/1/classes/' . $this->className . '/' . $this->objectId,
476-
$sessionToken
478+
$sessionToken, null, $useMasterKey
477479
);
478480
$this->_mergeAfterFetch($response);
479481
}

0 commit comments

Comments
 (0)