aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManager.m
diff options
context:
space:
mode:
authormltownsend <mltownsend@gmail.com>2010-06-02 19:50:42 +0000
committermltownsend <mltownsend@gmail.com>2010-06-02 19:50:42 +0000
commite8e177e02f16369ff8e3cab7dead707ae540eb5c (patch)
tree4ee3b064a9fefacf202c199e502f406948d54413 /Source/SPUserManager.m
parentbca662f4fe7ce463464f30ef67fe539191993c16 (diff)
downloadsequelpro-e8e177e02f16369ff8e3cab7dead707ae540eb5c.tar.gz
sequelpro-e8e177e02f16369ff8e3cab7dead707ae540eb5c.tar.bz2
sequelpro-e8e177e02f16369ff8e3cab7dead707ae540eb5c.zip
Fix for array index issues when deleting users, sometimes.
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r--Source/SPUserManager.m8
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;
}