]> andersk Git - moira.git/blobdiff - reg_svr/reg_svr.pc
check_username_available() should know about the userhistory table.
[moira.git] / reg_svr / reg_svr.pc
index 79d209ca634e647a8cfe49f29629656bfba5cb7c..a8616151ffd51d6aa1aef305e1a07523b0ad6f2e 100644 (file)
@@ -1006,6 +1006,13 @@ int check_username_available(char *username)
   if (count != 0)
     return MR_IN_USE;
 
+  EXEC SQL SELECT COUNT(login) INTO :count FROM userhistory
+    WHERE login = :username;
+  if (sqlca.sqlcode)
+    return MR_DBMS_ERR;
+  if (count != 0)
+    return MR_IN_USE;
+
   return MR_SUCCESS;
 }
 
This page took 0.032098 seconds and 4 git commands to generate.