public function removeRoleCommand($username, $role, $authenticationProvider = null)
{
$user = $this->getUserOrFail($username, $authenticationProvider);
try {
if ($this->userService->removeRoleFromUser($user, $role) > 0) {
$this->outputLine('Removed role "%s" from user "%s".', array($role, $username));
} else {
$this->outputLine('User "%s" did not have the role "%s" assigned.', array($username, $role));
}
} catch (NoSuchRoleException $exception) {
$this->outputLine('The role "%s" does not exist.', array($role));
$this->quit(2);
}
}