]> andersk Git - moira.git/commitdiff
don't allow duplicate MIT_ID's in ausr; allow rusr with status 6
authormar <mar>
Mon, 9 Apr 1990 19:23:04 +0000 (19:23 +0000)
committermar <mar>
Mon, 9 Apr 1990 19:23:04 +0000 (19:23 +0000)
server/qsupport.qc

index 3136bbcf1322f81a4dce6c358858840fe7d0335d..0cc32e43ede9fbf74577000322c15a5bc94189e8 100644 (file)
@@ -329,6 +329,12 @@ setup_ausr(q, argv, cl)
     client *cl;
 ##{
 ##  int nuid, rowcount;
+##  char *mit_id;
+
+    mit_id = argv[U_MITID];
+##  retrieve (rowcount = any(u.#mit_id where u.#mit_id = mit_id))
+    if (ingres_errno) return(mr_errcode);
+    if (rowcount) return(MR_EXISTS);
 
     if (!strcmp(argv[1], UNIQUE_UID) || atoi(argv[1]) == -1) {
        if (set_next_object_id("uid", "users"))
@@ -2550,7 +2556,7 @@ register_user(q, argv, cl)
 
     /* find user */
 ##  repeat retrieve (users_id = u.#users_id)
-##     where u.#uid = @uid and (u.status = 0 or u.status = 5)
+##     where u.#uid = @uid and (u.status = 0 or u.status = 5 or u.status = 6)
 ##  inquire_equel(rowcount = "rowcount");
     if (rowcount == 0)
       return(MR_NO_MATCH);
This page took 0.096322 seconds and 5 git commands to generate.