]> andersk Git - moira.git/blobdiff - dbck/phase1.pc
Check object IDs for user sponsors.
[moira.git] / dbck / phase1.pc
index 0b35abbd2df62531894b4696a93942f3b07e2c79..f89a618df173d7c8764a8e0930cc1c3fb861d922 100644 (file)
@@ -358,22 +358,22 @@ void phase1(void)
 
   EXEC SQL DECLARE csr102 CURSOR FOR
     SELECT users_id, login, last, first, status, potype, pop_id, box_id,
-    imap_id, modby, fmodby, pmodby, comments, sigwho FROM users
-    ORDER BY users_id;
+    imap_id, modby, fmodby, pmodby, comments, sigwho, sponsor_type, sponsor_id
+    FROM users ORDER BY users_id;
   EXEC SQL OPEN csr102;
   while (1)
     {
       EXEC SQL BEGIN DECLARE SECTION;
       char login[USERS_LOGIN_SIZE], nbuf[USERS_FIRST_SIZE + USERS_LAST_SIZE];
       char last[USERS_LAST_SIZE], first[USERS_FIRST_SIZE];
-      char potype[USERS_POTYPE_SIZE];
+      char potype[USERS_POTYPE_SIZE], sponsor_type[USERS_SPONSOR_TYPE_SIZE];
       int users_id, status, pop_id, box_id, imap_id, modby, fmodby, pmodby;
-      int comments, sigwho;
+      int comments, sigwho, sponsor_id;
       EXEC SQL END DECLARE SECTION;
 
       EXEC SQL FETCH csr102 INTO :users_id, :login, :last, :first,
        :status, :potype, :pop_id, :box_id, :imap_id, :modby, :fmodby,
-       :pmodby, :comments, :sigwho;
+       :pmodby, :comments, :sigwho, :sponsor_type, :sponsor_id;
       if (sqlca.sqlcode)
        break;
 
@@ -391,6 +391,8 @@ void phase1(void)
       u->pmodby = pmodby;
       u->comment = comments;
       u->sigwho = sigwho;
+      u->sponsor_type = sponsor_type[0];
+      u->sponsor_id = sponsor_id;
       switch (u->potype)
        {
        case 'P':
This page took 0.169099 seconds and 4 git commands to generate.