public function postlogout_hook($user) {
        global $CFG;
        // Only redirect to CAS logout if the user is logged as a CAS user.
        if (!empty($this->config->logoutcas) && $user->auth == $this->authtype) {
            $backurl = !empty($this->config->logout_return_url) ? $this->config->logout_return_url : $CFG->wwwroot;
            $this->connectCAS();
            phpCAS::logoutWithRedirectService($backurl);
        }
    }
public function postlogout_hook($user) {
        global $CFG;
        // Only redirect to CAS logout if the user is logged as a CAS user.
        if (!empty($this->config->logoutcas) && $user->auth == $this->authtype) {
            $backurl = !empty($this->config->logout_return_url) ? $this->config->logout_return_url : $CFG->wwwroot;
            $this->connectCAS();
            phpCAS::logoutWithRedirectService($backurl);
        }
    }
public function postlogout_hook ( $ user ) { global $ CFG ; // Only redirect to CAS logout if the user is logged as a CAS user. if ( ! empty ( $ this -> config -> logoutcas ) && $ user -> auth == $ this -> authtype ) { $ backurl = ! empty ( $ this -> config -> logout_return_url ) ? $ this -> config -> logout_return_url : $ CFG -> wwwroot ; $ this -> connectCAS ( ) ; phpCAS :: logoutWithRedirectService ( $ backurl ) ; } }
Post logout hook.

Note: this method replace the prelogout_hook method to avoid redirect to CAS logout
before the event userlogout being triggered.

@param stdClass $user clone of USER object object before the user session was terminated
Post logout hook .