简体   繁体   English

Moodle:通过Web服务进行外部用户注册

[英]Moodle: External user registration with web services

I'm trying to integrate moodle with an external system, the main idea is that when a user is register to the external system it should be register in moodle simultaneously. 我试图将Moodle与外部系统集成,主要思想是,当用户注册到外部系统时,应该同时在Moodle中进行注册。

In order to achieve this, I need to use web services on moodle, especifically: "auth_email_signup_user" 为了实现这一点,我需要在moodle上使用Web服务,特别是: “ auth_email_signup_user”

I followed the instruction from the following Moodle document: Using web services 我按照以下Moodle文档中的说明进行操作: 使用Web服务

My idea is to use REST protocol and use the token of Admin user. 我的想法是使用REST协议并使用Admin用户的令牌。

However, when I call the register service the moodle server is returning me: 但是,当我致电注册服务时,moodle服务器将返回我:

<?xml version="1.0" encoding="UTF-8" ?>
<EXCEPTION class="moodle_exception">
    <ERRORCODE>registrationdisabled</ERRORCODE>
    <MESSAGE>Registration is disabled on this site</MESSAGE>
</EXCEPTION>

Does your moodle allow self registration? 您的心情允许自我注册吗? See https://docs.moodle.org/36/en/Reducing_spam_in_Moodle#Allowing_self-registration 参见https://docs.moodle.org/36/en/Reducing_spam_in_Moodle#Allowing_self-registration

Nevertheless, it would be much more secure writing your own plugin exposing a registration webservice. 尽管如此,编写自己的插件来公开注册Web服务会更加安全。 Also avoid using a admin token, create a custom user and role for this plugin 还避免使用管理令牌,为此插件创建自定义用户和角色

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM