문제

In my CakePHP application, I have multiple controllers with different purposes. On each controller, i want to have different auth session timeouts (for security purposes). So, in the first controller, I want the user to time out after 15 minutes, while users on the second controller should time out after 24 hours. How can I achieve this?

도움이 되었습니까?

해결책

In your controller add beforefilter method

public function beforeFilter(){
 Configure::write('Session.timeout', 15);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top