Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignUp() function throws Fatal error #465

Open
maxiqsoft opened this issue Aug 10, 2020 · 0 comments
Open

SignUp() function throws Fatal error #465

maxiqsoft opened this issue Aug 10, 2020 · 0 comments

Comments

@maxiqsoft
Copy link

maxiqsoft commented Aug 10, 2020

Hi, I have a problem creating new users.
Even if I pass true within the signUp() call I get an error message.
Now I created an user named Admin and a role named Admin but I really wanna know why the user creating with my settings doesnt work properly?

this is my source code:

require 'parse-php-sdk/autoload.php';
use Parse\ParseClient;
use Parse\ParseUser;

$master_key = "XXXXXXXXXXXX";
$app_id = "XXXXXXXXX";
ParseClient::initialize( $app_id, "", $master_key );
ParseClient::setServerURL('https://lalalala:443','parse');

$user = new ParseUser();
$user->set("username", $_POST['username']);
$user->set("password", $_POST['password']);

try 
{
	$user->signUp();
	echo ParseUser::getCurrentUser()->getSessionToken();
	
} 
catch (ParseException $ex) 
{
	echo "Error: " . $ex->getCode() . " " . $ex->getMessage();
}

Environment Details

  • Your PHP Version: 7.2.12
  • Your Parse PHP SDK Version: 1.6.0
  • Your Operating System: Windows 10

This is the error message I get:

Fatal error: Uncaught Parse\ParseException: Permission denied for action create on class _User. in XXX\parse\parse-php-sdk\src\Parse\ParseClient.php:604 Stack trace: 
#0 XXX\parse\parse-php-sdk\src\Parse\ParseObject.php(1264): Parse\ParseClient::_request('POST', 'classes/_User', NULL, '{"username":"ha...', false) 
#1 XXX\parse\parse-php-sdk\src\Parse\ParseObject.php(1172): Parse\ParseObject::deepSave(Object(Parse\ParseUser), false) 
#2 XXX\parse\parse-php-sdk\src\Parse\ParseUser.php(122): Parse\ParseObject->save() 
#3 XXX\parse\create_user.php(20): Parse\ParseUser->signUp(true) 
#4 {main} thrown in XXX\parse\parse-php-sdk\src\Parse\ParseClient.php on line 604

These are the permissions for the class User

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant