Jump to content

$user API Documentation - References to Page Object


kongondo
 Share

Recommended Posts

Hi @ryan,

I just noticed that part of the documentation for $user variable refer to Page objects instead of User object. Yes, technically, these are pages as well but I think it might confuse new ProcessWire users. In addition, the $user variable docs clear refer to users as 'users' and not 'pages'. Here's an example of what I mean.

$users->delete()

Quote

Permanently delete a page and its fields.

Unlike $pages->trash(), pages deleted here are not restorable.

If you attempt to delete a page with children, and don’t specifically set the $recursive argument to true, then this method will throw an exception. If a recursive delete fails for any reason, an exception will be thrown.

Here is the list of docs that need amending (that I could find):

  1. https://processwire.com/api/ref/users/add/
  2. https://processwire.com/api/ref/users/added/
  3. https://processwire.com/api/ref/users/delete-ready/
  4. https://processwire.com/api/ref/users/deleted/
  5. https://processwire.com/api/ref/users/find/
  6. https://processwire.com/api/ref/users/save/
  7. https://processwire.com/api/ref/users/save-ready/ (some bits are OK).
  8. https://processwire.com/api/ref/users/saved/

The get* methods and setCurrentUser() are all OK, referring to User object instead of Page object. The saveReady() refers to User object in some parts but Page object in others. For instance:

Quote

Hook called just before a user is saved

But further down...

Quote

$array = $users->saveReady(Page $page);

Could you please consider amending these? Thanks.

  • Like 2
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...