这有点令人沮丧,
我正在尝试使用网络服务添加新用户,这些是我的参数:
$user1 = new stdClass();
$user1->username = "testing";//trim(urlencode(filter_var($_POST['arr']['user_email'],FILTER_SANITIZE_STRING)));
$user1->password = "asdL1232";//trim(filter_var($_POST['arr']['user_password'],FILTER_SANITIZE_STRING));
$user1->firstname = "testname";//isset($name[0]) ? urlencode($name[0]) : '';
$user1->lastname = "testlastname";//isset($name[1]) ? urlencode($name[1]) : '';
$user1->email = "tests@gmail.com";//urlencode(filter_var($_POST['arr']['user_email'],FILTER_SANITIZE_STRING));
$user1->auth = 'manual';
$user1->surname = 'asdsad';
$user1->country = 'Israel';
$user1->lang = 'he';
$user1->idnumber = '';
$user1->theme = 'standard';
这是服务器响应:
“检测到无效的参数值| ERRORCODE:invalidparameter”
我无法理解哪个参数有误...
任何人都可以帮忙吗?
由于
答案 0 :(得分:0)
在测试此用户对象代码时,我看到了以下问题 -
用于测试总是在moodle中启用调试模式。