2

I'm trying to modify user using following code.

$queryUsers = new ParseQuery("_User");
$queryUsers->equalTo("objectId", $userId);        
$resultsUsers = $queryUsers->find();  
$updateUsers = $queryUsers->first(); 
$updateUsers->set("status", $status);                        
$updateUsers->save();     

But parse SDK returning following error.

An uncaught Exception was encountered

Type: Parse\ParseException

Message: Cannot modify user n7ZERX6Fls.

Filename: /var/www/html/mementuum_admin/application/third_party/parse-php-sdk-master/src/Parse/ParseClient.php

I have modified several other tables but not able to modify user table in parse.

Please Help.

2
  • Sometimes it's an issues with the sessions. You can try clearing the sessions associated with the user. It could also be something like the wrong masterkey but I suspect you wouldn't be able to pull data at all if that were the case. Commented Mar 2, 2017 at 8:14
  • Thanks for your comment. I have clear the session of this user but not working. Commented Mar 2, 2017 at 8:50

1 Answer 1

5

Finally I got the answer.

Just we need to add 'true' in save function.

Code should be following

$updateUsers->save(true);

Instead of

 $updateUsers->save();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.