]> andersk Git - moira.git/commitdiff
Check userhistory table as well as users table to determine if login is
authorzacheiss <zacheiss>
Sun, 18 Sep 2005 02:49:57 +0000 (02:49 +0000)
committerzacheiss <zacheiss>
Sun, 18 Sep 2005 02:49:57 +0000 (02:49 +0000)
in use.

server/qsupport.pc

index a64b43896f70b8aebbbc0148b42fb35aa6c056bb..33c6163cd9b4b62ecbd8a89c268285b23ee77007 100644 (file)
@@ -1523,6 +1523,15 @@ int register_user(struct query *q, char **argv, client *cl)
     return mr_errcode;
   if (rowcount > 0)
     return MR_IN_USE;
+
+  /* Remove this check when we're allowing username reuse again. */
+  EXEC SQL SELECT COUNT(login) INTO :rowcount FROM userhistory
+    WHERE login = :login;
+  if (dbms_errno)
+    return mr_errcode;
+  if (rowcount > 0)
+    return MR_IN_USE;
+
   EXEC SQL SELECT COUNT(name) INTO :rowcount FROM list
     WHERE LOWER(name) = :login;
   if (dbms_errno)
This page took 0.052458 seconds and 5 git commands to generate.