Skip to content

Commit 4ba0c14

Browse files
committed
Make codechecker happy again
1 parent 5e0a65b commit 4ba0c14

File tree

8 files changed

+386
-178
lines changed

8 files changed

+386
-178
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Changes
66

77
### Unreleased
88

9+
* 2025-10-15 - Make codechecker happy again
910
* 2025-10-15 - Tests: Switch Github actions workflows to reusable workflows by Moodle an Hochschulen e.V.
1011

1112
### v5.0-r2

classes/eventobservers.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,13 @@ public static function user_created(\core\event\base $event) {
4444

4545
// Do only if user id is enclosed in $eventdata.
4646
if (!empty($event->relateduserid)) {
47-
4847
// Get user data.
4948
$user = $DB->get_record('user', ['id' => $event->relateduserid]);
5049

5150
// Do if user was found.
5251
if (!empty($user->username)) {
53-
5452
// Do only if user has ldap_syncplus authentication.
5553
if (isset($user->auth) && $user->auth == 'ldap_syncplus') {
56-
5754
// Update user.
5855
// Actually, we would want to call auth_plugin_base::update_user_record()
5956
// which is lighter, but this function is unfortunately protected since Moodle 3.5.

classes/privacy/provider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3333
*/
3434
class provider implements \core_privacy\local\metadata\null_provider {
35-
3635
/**
3736
* Get the language string identifier with the component's language
3837
* file to explain why this plugin stores no data.

classes/task/sync_roles.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@
3232
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3333
*/
3434
class sync_roles extends \core\task\scheduled_task {
35-
3635
/**
3736
* Constructor.
3837
*/
3938
public function __construct() {
4039
global $CFG;
4140

4241
// Require local library.
43-
require_once($CFG->dirroot.'/auth/ldap_syncplus/locallib.php');
42+
require_once($CFG->dirroot . '/auth/ldap_syncplus/locallib.php');
4443

4544
// No need to call parent constructor as it does not exist.
4645
}
@@ -80,5 +79,4 @@ public function execute() {
8079
}
8180
}
8281
}
83-
8482
}

classes/task/sync_task.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct() {
4444
global $CFG;
4545

4646
// Require local library.
47-
require_once($CFG->dirroot.'/auth/ldap_syncplus/locallib.php');
47+
require_once($CFG->dirroot . '/auth/ldap_syncplus/locallib.php');
4848

4949
// No need to call parent constructor as it does not exist.
5050
}

db/upgrade.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ function xmldb_auth_ldap_syncplus_upgrade($oldversion) {
5454

5555
if ($oldversion < 2021072003) {
5656
// Normalize the memberattribute_isdn plugin config.
57-
set_config('memberattribute_isdn',
58-
!empty(get_config('auth_ldap_syncplus', 'memberattribute_isdn')), 'auth_ldap');
57+
set_config(
58+
'memberattribute_isdn',
59+
!empty(get_config('auth_ldap_syncplus', 'memberattribute_isdn')),
60+
'auth_ldap'
61+
);
5962

6063
upgrade_plugin_savepoint(true, 2021072003, 'auth', 'ldap_syncplus');
6164
}

0 commit comments

Comments
 (0)