How to disconnect the user connection?
Currently there is no easy way of doing it. You can bring database to some of shutdown modes, but it affects all users. If you use Classic you can (with some effort) find the users process by detecting the IP address and open database files of that process and simply kill that process. With Super Server it is not possible as the connection is run in a thread of multithreaded SuperServer process.
There are plans for future versions of Firebird to address this. For example, version 2.1 introduces ability to cancel running queries (by deleting the relevant records from MON$STATEMENTS table).
If you just want to take the database offline for maintenance (all users disconnected), you can take database to a shutdown mode using gfix and then rename the database file, so that nobody can connect, not even by chance. On Windows, you won't be able to rename the database file while in use. On Linux, you need to check manually whether the file is in use by using 'fuser' or 'lsof' command. Make sure you run those as 'root' user, as ordinary users cannot detect files opened by other accounts.