userExists function
Checks whether the supplied user exists on the given instance. If they do exist, "true" is returned. If they don't exist, "false" is returned.
Implementation
Future<bool> userExists(
String userName,
String server,
String baseUrl,
String apiBase,
) async {
Map<String,dynamic> userInfo = await getUserInfo(
userName,
server,
baseUrl,
apiBase
);
bool result = false;
if (responseIsError(userInfo) == false){
result = true;
}
else {
// Do nothing.
}
return result;
}