Removed ical_dezonify() from the citserver build ... it isn't used anymore
[citadel.git] / citadel / user_ops.c
index 31864a27bdd336e86ffc36ef1168be98301de5c7..8548f823420e665d488a5194757d6f25d264970d 100644 (file)
@@ -632,7 +632,7 @@ void do_login(void)
        /* If this user's name is the name of the system administrator
         * (as specified in setup), automatically assign access level 6.
         */
-       if (!strcasecmp(CCC->user.fullname, CtdlGetConfigStr("c_sysadm"))) {
+       if ( (!IsEmptyStr(CtdlGetConfigStr("c_sysadm"))) && (!strcasecmp(CCC->user.fullname, CtdlGetConfigStr("c_sysadm"))) ) {
                CCC->user.axlevel = AxAideU;
        }
 
@@ -644,6 +644,7 @@ void do_login(void)
                        CCC->user.axlevel = AxAideU;
                }
        }
+       CtdlPutUserLock(&CCC->user);
 
        /*
         * If we are using LDAP authentication, extract the user's email addresses from the directory.
@@ -660,13 +661,12 @@ void do_login(void)
 #endif
 
        /*
-        * No email address for user?  Make one up.
-        */
+        * No email address for user?  Make one up.     (commented out because it appears to break things)
        if (IsEmptyStr(CCC->user.emailaddrs)) {
                sprintf(CCC->user.emailaddrs, "cit%ld@%s", CCC->user.usernum, CtdlGetConfigStr("c_fqdn"));
        }
+        */
        
-       CtdlPutUserLock(&CCC->user);
 
        /*
         * Populate cs_inet_email and cs_inet_other_emails with valid email addresses from the user record