Jump to content

mackenzie

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Female
  • Location
    Austin, TX

mackenzie's Achievements

Newbie

Newbie (2/6)

3

Reputation

  1. Thanks for the help, that solved the problem combined with moving the $person->of(false); to before setting the value. The examples I'd been looking at were probably from an old version of the syntax or something.
  2. it's in a _init.php that's set as the prependTemplateFile wire()->addHookAfter("Session::login", function(HookEvent $event) { $name = $event->arguments('$name'); $name = $this->wire('sanitizer')->username($name); $person = $this->wire('users')->get("name=$name"); $last = $person->last_login; $person->last_login = date('Y-m-d H:i:s'); $person->save(); });
  3. thanks for the fast response! Yes this was exactly what I needed to know I can just stick the $user->last_page_load = date('Y-m-d H:i:s'); $user->of(false); $user->save(); chunk in a hook. Only I'm getting an error when it tries to save. Somehow the $user variable has become a NullPage by that line but wasn't on any previous line. Also what is the second line doing? Error: Exception: Can't save page 0: : Pages of type NullPage are not saveable (in D:\somepath\processwire\wire\core\Pages.php line 604) thanks again
  4. Hi everyone, sorry if this is a duplicate question but I cannot seem to find the proper way to achieve what I want. I need a way to store and retrieve the datetime of users' last login so that I can display a list of pages that have been updated since the user was last logged in. I've been trying to accomplish this with hooks but I can't figure out where to store the login date. I feel like I should be able to do this with just $user->get and $user->set, but it seems like these only hang around during the current session? Do I need to extend the User class in a module or is there another way to add a field to the User class? Thanks in advance!
  5. This is a great module! However I'm having a small issue in 2.4.0. ImageManager is not detecting the pages a photo is placed on. I've tried adding the photo to the page via the provided Imagetag and the TinyMCE inserts and either way the 'Pages' column of the ImageManager only shows the 'search' page, even though I can see the image when I view the page from the front-end. Has anyone else experienced this?
  6. Thanks for making this! I was just trying it out in 2.4 and the draft creation works fine but the ability to "publish" and remove the draft appears non-existent. Something to look at if you want to bring this module up to the current release, which I sure hope to see.
  7. Hi there, sorry to resurrect. Brand new to PW and about to start a project where having 'save as draft' ability is necessary for team workflow. Glad to hear that it's on the roadmap for 2.5, but just want to confirm there is no published module that can perform this functionality in the meantime? Perhaps since this discussion was last updated...?
×
×
  • Create New...