X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fuseredit.c;h=85e55f43a988491d94886e2bc5b757d2703358a2;hb=6340173518505de7c9f538c69845ff7dd5d0c226;hp=5eccfdb76ae52e21d16e0647fb71a52f24360676;hpb=dcae8966f0bb1443dc3c843462c38e07d79a018d;p=citadel.git diff --git a/webcit/useredit.c b/webcit/useredit.c index 5eccfdb76..85e55f43a 100644 --- a/webcit/useredit.c +++ b/webcit/useredit.c @@ -391,11 +391,16 @@ int ConditionalFlagINetEmail(StrBuf *Target, WCTemplputParams *TP) int ConditionalUserAccess(StrBuf *Target, WCTemplputParams *TP) { UserListEntry *ul = (UserListEntry*) CTX; - - if (TP->Tokens->Params[3]->Type == TYPE_LONG) - return (TP->Tokens->Params[3]->lvalue == ul->AccessLevel); - else + + if (ul == NULL) return 0; + + return GetTemplateTokenNumber(Target, + TP, + 3, + AxNewU) + == + ul->AccessLevel; } /*