mirror of
https://github.com/moodle/moodle.git
synced 2025-04-06 00:42:44 +02:00
Merge branch 'MDL-65518-master-fix1' of https://github.com/damyon/moodle
This commit is contained in:
commit
7fcc7e0125
@ -91,7 +91,7 @@ class backpack_api {
|
||||
$this->backpackapiurl = $sitebackpack->backpackapiurl;
|
||||
$this->backpackapiversion = $sitebackpack->apiversion;
|
||||
$this->password = $sitebackpack->password;
|
||||
$this->email = !empty($CFG->badges_defaultissuercontact) ? $CFG->badges_defaultissuercontact : $admin->email;
|
||||
$this->email = !empty($CFG->badges_defaultissuercontact) ? $CFG->badges_defaultissuercontact : '';
|
||||
$this->isuserbackpack = false;
|
||||
$this->backpackid = $sitebackpack->id;
|
||||
if (!empty($userbackpack)) {
|
||||
|
@ -1195,7 +1195,7 @@ function badges_verify_site_backpack() {
|
||||
|
||||
// Now attempt a login with these credentials.
|
||||
$result = $backpackapi->authenticate();
|
||||
if ($result === false || !empty($result->error)) {
|
||||
if (empty($result) || !empty($result->error)) {
|
||||
$warning = $backpackapi->get_authentication_error();
|
||||
|
||||
$params = ['id' => $backpack->id, 'action' => 'edit'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user