src/User/Service/User.php
public function logout() 
    {
		$auth = $this->getServiceLocator()->get('ControllerPluginManager')->get('zfcUserAuthentication');
		
		if($auth->hasIdentity()) {
	        $auth->getAuthAdapter()->resetAdapters();
	        $auth->getAuthAdapter()->logoutAdapters();
	        $auth->getAuthService()->clearIdentity();
		}
    }
public function logout() 
    {
		$auth = $this->getServiceLocator()->get('ControllerPluginManager')->get('zfcUserAuthentication');
		
		if($auth->hasIdentity()) {
	        $auth->getAuthAdapter()->resetAdapters();
	        $auth->getAuthAdapter()->logoutAdapters();
	        $auth->getAuthService()->clearIdentity();
		}
    }
Do logout

@return void