Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SignUp() function throws Fatal error

未关闭
#465 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
php

调研方向

Start at src/Parse/ParseClient.php:604 and follow the signup path through src/Parse/ParseUser.php:122, using the supplied PHP 7.2.12, SDK 1.6.0, and _User permission details. Reproduce the signUp() call and trace the permission failure; done would be a confirmed diagnosis with a clearly stated corrective change or documentation update.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
PHP
星标
808
派生
340
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

parse-community/parse-php-sdk 的其他 Issue

查看 parse-community/parse-php-sdk 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。