]> code.citadel.org Git - citadel.git/blobdiff - citadel/room_ops.c
* room_ops.c: when granting a room creator access to a new room, omit the
[citadel.git] / citadel / room_ops.c
index e268ed0c72ebbcabb6ef8554ef3df82a1238ac6c..dd2f60ce65fb611fa1a082be22b2a15b07d2e28c 100644 (file)
@@ -1805,13 +1805,11 @@ unsigned create_room(char *new_room_name,
        /* Grant the creator access to the room unless the avoid_access
         * parameter was specified.
         */
-       if (avoid_access == 0) {
-               lgetuser(&CC->user, CC->curr_user);
+       if ( (CC->logged_in) && (avoid_access == 0) ) {
                CtdlGetRelationship(&vbuf, &CC->user, &qrbuf);
                vbuf.v_flags = vbuf.v_flags & ~V_FORGET & ~V_LOCKOUT;
                vbuf.v_flags = vbuf.v_flags | V_ACCESS;
                CtdlSetRelationship(&vbuf, &CC->user, &qrbuf);
-               lputuser(&CC->user);
        }
 
        /* resume our happy day */