From: mar Date: Mon, 9 Apr 1990 19:23:04 +0000 (+0000) Subject: don't allow duplicate MIT_ID's in ausr; allow rusr with status 6 X-Git-Tag: release77~891 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/c928f249dc38c9ab8756c453a0f1c4a78d6f95f2?hp=2662d7666988616ebb272e8ea76be8aa848f1018 don't allow duplicate MIT_ID's in ausr; allow rusr with status 6 --- diff --git a/server/qsupport.qc b/server/qsupport.qc index 3136bbcf..0cc32e43 100644 --- a/server/qsupport.qc +++ b/server/qsupport.qc @@ -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);