X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fuser_ops.c;h=8548f823420e665d488a5194757d6f25d264970d;hb=a7d7e3f128e15f282f2a96aba513823aa9603c22;hp=31864a27bdd336e86ffc36ef1168be98301de5c7;hpb=07a2459e8adcace90dfa3c36be48a606ac2bf511;p=citadel.git diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 31864a27b..8548f8234 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -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