This allows the creation of users via CLI scripts that currently error because the application object is an instance of JApplicationCli and the isAdmin method doesn't exist.
You can test by ensuring that creating a user in the frontend and backend of Joomla work as expected. If you want to have bonus brownie points you can create your own CLI script that will now create users succesfully
The only negative thing to this is it disables the ability to send e-mails to the new users when creating the accounts via CLI. Then again, everything inside this if statement assumes a JApplicationCms object is in use (i.e. getting the configuration data). There's no good answer here; you either hardcode a block for a feature or you start refactoring to make the code work on CLI correctly or impose new requirements on CLI apps (which BTW could be partially addressed with my command runner PR).
It helps with defining a standard interface, something we're lacking for the CMS application class because we basically assume everywhere in the code that apps will always be a web application based on our CMS application class.
After talking with @roland-d I've changed this to a method exists check in case someone has added a isAdmin method to a JApplicationCli class..... yes i hate myself too
The only negative thing to this is it disables the ability to send e-mails to the new users when creating the accounts via CLI. Then again, everything inside this if statement assumes a JApplicationCms object is in use (i.e. getting the configuration data). There's no good answer here; you either hardcode a block for a feature or you start refactoring to make the code work on CLI correctly or impose new requirements on CLI apps (which BTW could be partially addressed with my command runner PR).