Jump to content

Check within page pages


Manaus
 Share

Recommended Posts

Hello,

I'm trying to ckech whether a user is allowed to see a specific page. The page has a Page field, holding the assigned users. I tried $page->allowedusers = $user, $page->has($user) and so on, but it's not working...

Thanks for any help.

Link to comment
Share on other sites

Also, from the API:

$page->viewable()
Is the page viewable by the current user? Returns true or false. Note that this is only useful on pages other than the current page being viewed, as ProcessWire won't let the user load a page (by URL) that they don't have access to view.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...