Actually these are not user names. These are account names. Account names are specified in Manage | Security. User names are specified in Preferences. FileMaker confuses things a bit by putting the user name in as the default account name when you first open a password protected file.
In theory, you could set up a table that logs each user in and out when they open and close FileMaker and thus a script could check this table to see if this is the second case of the same account name being used to log in without first having logged out of the other session.
But in practice, there's a lot of problems due to the fact that a session might enter in force quit, system disconnect or a crash and then the user is not logged out and they will not be permitted to re-log back into the file. And users may routinely sleep their IOS device without disconnecting or lose connection due to moving outside of WiFi or 3G/4G range.