original_string: public function execute() {
          global $DB;
          if (is_enabled_auth('ldap')) {
              $auth = get_auth_plugin('ldap');
              $users = $DB->get_records('user', array('auth' => 'ldap'));
              foreach ($users as $user) {
                  $auth->sync_roles($user);
              }
          }
      }
code: public function execute() {
          global $DB;
          if (is_enabled_auth('ldap')) {
              $auth = get_auth_plugin('ldap');
              $users = $DB->get_records('user', array('auth' => 'ldap'));
              foreach ($users as $user) {
                  $auth->sync_roles($user);
              }
          }
      }
code_tokens: public function execute ( ) { global $ DB ; if ( is_enabled_auth ( 'ldap' ) ) { $ auth = get_auth_plugin ( 'ldap' ) ; $ users = $ DB -> get_records ( 'user' , array ( 'auth' => 'ldap' ) ) ; foreach ( $ users as $ user ) { $ auth -> sync_roles ( $ user ) ; } } }
docstring: Synchronise role assignments from LDAP.
docstring_tokens: Synchronise role assignments from LDAP .