lib/private/User/Session.php
/**
	 * Remove cookie for "remember username"
	 */
Remove cookie for "remember username"
Remove cookie for " remember username "
public function unsetMagicInCookie() {
		$secureCookie = OC::$server->getRequest()->getServerProtocol() === 'https';
		unset($_COOKIE['nc_username']); 
		unset($_COOKIE['nc_token']);
		unset($_COOKIE['nc_session_id']);
		setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);
		setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);
		setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);
		setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);
		setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);
		setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);
	}
public function unsetMagicInCookie ( ) { $ secureCookie = OC :: $ server -> getRequest ( ) -> getServerProtocol ( ) === 'https' ; unset ( $ _COOKIE [ 'nc_username' ] ) ; unset ( $ _COOKIE [ 'nc_token' ] ) ; unset ( $ _COOKIE [ 'nc_session_id' ] ) ; setcookie ( 'nc_username' , '' , $ this -> timeFactory -> getTime ( ) - 3600 , OC :: $ WEBROOT , '' , $ secureCookie , true ) ; setcookie ( 'nc_token' , '' , $ this -> timeFactory -> getTime ( ) - 3600 , OC :: $ WEBROOT , '' , $ secureCookie , true ) ; setcookie ( 'nc_session_id' , '' , $ this -> timeFactory -> getTime ( ) - 3600 , OC :: $ WEBROOT , '' , $ secureCookie , true ) ; setcookie ( 'nc_username' , '' , $ this -> timeFactory -> getTime ( ) - 3600 , OC :: $ WEBROOT . '/' , '' , $ secureCookie , true ) ; setcookie ( 'nc_token' , '' , $ this -> timeFactory -> getTime ( ) - 3600 , OC :: $ WEBROOT . '/' , '' , $ secureCookie , true ) ; setcookie ( 'nc_session_id' , '' , $ this -> timeFactory -> getTime ( ) - 3600 , OC :: $ WEBROOT . '/' , '' , $ secureCookie , true ) ; }
Remove cookie for "remember username"
Remove cookie for " remember username "
//TODO: DI for cookies and IRequest //TODO: DI // old cookies might be stored under /webroot/ instead of /webroot // and Firefox doesn't like it!