]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/user_ops.c
Moved makeuserkey() into its own file because we need it in ctdlload
[citadel.git] / citadel / server / user_ops.c
index 62e62f49297b19ccfeb97821aca5ad0ec58d5c9e..fc87a03d96d6ba9198de7dff8210de45b7405727 100644 (file)
@@ -25,28 +25,6 @@ int chkpwd_write_pipe[2];
 int chkpwd_read_pipe[2];
 
 
-// makeuserkey() - convert a username into the format used as a database key
-//             "key" must be a buffer of at least USERNAME_SIZE
-//             (Key format is the username with all non-alphanumeric characters removed, and converted to lower case.)
-void makeuserkey(char *key, const char *username) {
-       int i;
-       int keylen = 0;
-
-       if (IsEmptyStr(username)) {
-               key[0] = 0;
-               return;
-       }
-
-       int len = strlen(username);
-       for (i=0; ((i<=len) && (i<USERNAME_SIZE-1)); ++i) {
-               if (isalnum((username[i]))) {
-                       key[keylen++] = tolower(username[i]);
-               }
-       }
-       key[keylen++] = 0;
-}
-
-
 // Compare two usernames to see if they are the same user after being keyed for the database
 // Usage is identical to strcmp()
 int CtdlUserCmp(char *s1, char *s2) {