我正在设置 Moodle 3.0 以允许来自我的 CMS(使用框架 CakePHP 2.6 开发)的用户登录到 Moodle。这两个数据库在同一台服务器上。我正在使用 Moodle 中的“外部数据库”选项,这似乎是最容易设置的解决方案。
根据 Moodle Docs,脚本/path/to/moodle/auth/db/cli/sync_users.php
将用户从外部数据库 (CMS) 导入到 Moodle,这非常有效,但是使用外部数据库的凭据(用户名和密码)登录到 Moodle 不起作用。
我认为问题可能是“外部数据库”设置中的“格式密码”(我使用的是 SHA-1 哈希)。因为在 CakePHP 中有密码散列(使用盐的 SHA1)。当我将“格式密码”设置为“纯文本”时,它可以工作,但这不是我想要的。有什么办法可以解决这个问题吗?
https://docs.moodle.org/27/en/External_database_authentication