X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fauth.c;h=22dbcfbf29911dba2adc680d3c004189487f6a80;hb=f8f14fab4d4a851c271528df8f0a33a2a17e5b04;hp=a751b89d8137e778860537a9422a3020d01e19c3;hpb=6c114e1487e4b4032be88563f0f5b76922edd601;p=citadel.git diff --git a/webcit/auth.c b/webcit/auth.c index a751b89d8..22dbcfbf2 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -882,21 +882,25 @@ void changepw(void) int ConditionalAide(StrBuf *Target, WCTemplputParams *TP) { - return (WC->is_aide == 0); + wcsession *WCC = WC; + return (WCC != NULL)? (WC->is_aide == 0) : 0; } int ConditionalRoomAide(StrBuf *Target, WCTemplputParams *TP) { - return (WC->is_room_aide == 0); + wcsession *WCC = WC; + return (WCC != NULL)? (WCC->is_room_aide == 0) : 0; } -int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP) { - return (WC->logged_in == 0); +int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP) +{ + wcsession *WCC = WC; + return (WCC != NULL)? (WCC->logged_in == 0) : 0; } int ConditionalRoomAcessDelete(StrBuf *Target, WCTemplputParams *TP) { wcsession *WCC = WC; - return ( (WCC->is_room_aide) || (WCC->is_mailbox) || (WCC->room_flags2 & QR2_COLLABDEL) ); + return (WCC != NULL)? ( (WCC->is_room_aide) || (WCC->is_mailbox) || (WCC->room_flags2 & QR2_COLLABDEL) ) : 0; }