Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
check_privs
What is lib/txplib_misc.php
’s check_privs()
function for? Doesn’t appear to be referenced directly from anywhere in the core. Any plugins use it? If not, can it be deprecated?
I was just looking for a function that could take a user and ask ‘does this user have one of these priv levels’. I don’t care whether they can access particular resources, I just want to know what level they are. Don’t think such a function or variable exists ($GLOBALS['privs']
isn’t set until pagetop()
) so I guess I’ll make a DB call.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: check_privs
Appears to be an inferior equivalent of require_privs()
, and as you say apparently not used by any core function. Deprecate away.
Code is topiary
Offline
Re: check_privs
Looking back, it seems that is hasn’t been used by a core function in TXP 4.0.3 and newer (perhaps even for a longer time, but I don’t have access to an older TXP version).
Offline
Pages: 1