For the benefit of the archives, here's what I ended up doing:

    if ($key_value[1] & 128) {
      $key_value[1] = 1; // moderated
    }
    else {
      $key_value[1] = 0; // not moderated
    }

$key_value[1] being the second part of the user_options field in
config.pck, after I turned it into an array:
'[email protected]': 408,

rac

On Tue, Aug 22, 2023 at 5:11 PM Russell Clemings <[email protected]>
wrote:

> That does it, thanks.
>
> rac
>
> On Tue, Aug 22, 2023 at 3:06 PM Mark Sapiro <[email protected]> wrote:
>
>> On 8/22/23 2:50 PM, Russell Clemings wrote:
>> > What's the logic behind that? I should have mentioned that I'll be doing
>> > this in PHP so I'll have to replicate it.
>>
>>
>> It works the same in PHP. See
>> https://www.php.net/manual/en/language.operators.bitwise.php
>>
>> --
>> Mark Sapiro <[email protected]>        The highway is for gamblers,
>> San Francisco Bay Area, California    better use your sense - B. Dylan
>>
>> ------------------------------------------------------
>> Mailman-Users mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>> https://mail.python.org/mailman3/lists/mailman-users.python.org/
>> Mailman FAQ: http://wiki.list.org/x/AgA3
>> Security Policy: http://wiki.list.org/x/QIA9
>> Searchable Archives:
>> https://www.mail-archive.com/[email protected]/
>>     https://mail.python.org/archives/list/[email protected]/
>> Member address: [email protected]
>>
>
>
> --
> ===============================================
> Russell Clemings
> <[email protected]>
> ===============================================
>


-- 
===============================================
Russell Clemings
<[email protected]>
===============================================
------------------------------------------------------
Mailman-Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/[email protected]/
    https://mail.python.org/archives/list/[email protected]/
Member address: [email protected]

Reply via email to