Subj : User Object USER_DELETED
To : Mortifis
From : Digital Man
Date : Tue Jul 23 2019 01:55 pm
Re: User Object USER_DELETED
By: Mortifis to All on Tue Jul 23 2019 12:52 pm
> I am unsure how to restore a user with the user.settings.USER_DELETED or
> restore a USER_INACTIVE any help would be appreciated
USER_DELETED and USER_INACTIVE are bit flags. An integer can hold many bit flags (typically, 32). In the case of user.settings, each bit as a pre-defined purpose and those bits have been assigned symbolic names (in userdefs.js).
To set (add) a bit-flag, you bit-wise "OR" it into the value, like so:
user.settings |= USER_DELETED;
To unset (remove) a bit-flag, you bit-wise "AND" it with the opposite (bit-wise not) value, like so:
user.settings &= ~USER_DELETED;
Hope that helps,
digital man
This Is Spinal Tap quote #6:
David St. Hubbins: He was the patron saint of quality footwear.
Norco, CA WX: 99.6�F, 30.0% humidity, 4 mph ESE wind, 0.00 inches rain/24hrs
---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net