diff options
-rw-r--r-- | Source/SPUserManager.m | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index e6809921..da87a454 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -1006,9 +1006,11 @@ } - droppedUsers = [[droppedUsers substringToIndex:[droppedUsers length]-2] mutableCopy]; - [self.mySqlConnection queryString:[NSString stringWithFormat:@"DROP USER %@", droppedUsers]]; - [droppedUsers release]; + if ([droppedUsers length] > 2) { + droppedUsers = [[droppedUsers substringToIndex:[droppedUsers length]-2] mutableCopy]; + [self.mySqlConnection queryString:[NSString stringWithFormat:@"DROP USER %@", droppedUsers]]; + [droppedUsers release]; + } return TRUE; } |