/**
  * @see IUserAuthentication::logoutUser()
  */
 public function logoutUser(User $currentUser)
 {
     if ($currentUser->getRole() == ROLE_USER) {
         $currentUser->id = null;
         $currentUser->username = null;
         $currentUser->email = null;
         $_SESSION = array();
         session_destroy();
         CookieHelper::destroyCookie('user');
     }
 }