Jump to content

helmut2509

Members
  • Posts

    110
  • Joined

  • Last visited

Recent Profile Visitors

2,347 profile views

helmut2509's Achievements

Sr. Member

Sr. Member (5/6)

10

Reputation

2

Community Answers

  1. if(!session()->isLoggedin) session()->redirect(config()->loginUrl);
  2. In my PW-Application there is currently no session timeout. I want to set the user session to 60 minutes which means that after 60 minutes of inactivity the user will be redirected to the homepage. so I added the following entry to my config.php: $config->sessionExpireSeconds = 120; (120 seconds is just for testing). But after five minutes of inactivity I am still logged in, there is no redirection. Is there anything wrong or did I miss something? In php.ini I have the entry: session.cookie_lifetime = 3600
  3. thanx for the tip. I will try this.
  4. Hello, I am just going to write a class to process data in my pw app. My question: where should I store the class files? should I use a separate directory? Or should I integrate the class in a module? there are certainly different approaches and I am not sure which one to use... thanx for your help.
  5. I use $view->render , where $view is the instance of a template.
  6. thanks. I guess the bug is most probably related to a multiple including of a script.
  7. I checked the entire project folder: there is only ONE declaration of this function!
  8. When calling a page, I get the error (logged in /logs/errors.txt):"Cannot redeclare myfunction..(previously declared in...)" It seems there is a second declaration of this function, but where? I already added the namespace Processwire and switched off template compiling, but to no avail. (PW version 3.0.42) any ideas?
  9. $view is an instance of \ProcessWire\TemplateFile
  10. Hello, I just found out that, when passing a (numeric) zero with "$view->myVar=0" to a template then the corresponding template variable $this->myVar is empty, it has no value. This even occurs when I convert the value to a string: (string) 0 Strings and numeric values other than zero are handled correctly. I think this is a bug which should be fixed?! regards, Helmut
  11. thanks for the tip. In my google search result the above link did not appear ;-((
  12. In my PW app I have now a php script which caters to the upload of files. It does not directly belong to the UI and therefore I did not store it in the templates folder, but in a custom folder. My question is: how do I get access from this script to the Pw API? Can I leave it in the custom folder?
  13. you are right, I have made a stupid error. thanx, guys!
  14. In the function I wrote wire('session')->set('number', '12345'); and outside the function I tried : echo $session->number ...but this variable was empty....
×
×
  • Create New...