Ad (728x90)

Showing posts with label SugarCRM Tips. Show all posts
Showing posts with label SugarCRM Tips. Show all posts

Friday, December 20, 2013

Tips extending session timeout in sugarcrm

Probably will be a little annoying if you often get the message " Your session has expired . Please log in again . " while working in the administration of SugarCRM (Sugar backend ) . Would not want to go back to the administration area of SugarCRM ( Sugar backend ) , you must enter a user name and password again . Actually, Sugar has a strong and logical reasons related to security issues (security issues) . By default ,  remain in the administration of SugarCRM for a maximum of 15 minutes without activity . After more than 15 minutes without activity and you start again do the activity in the area of ​​administration , SugarCRM will display this message and requires you to login . Limiting the time without activity in the area of ​​administration will prevent unwanted things associated with your SugarCRM administration area .

When the 15 minute time limit is too short you think , in fact you can extend the time by changing the existing default value . Alternatively , you can install an extension that can disable session timings . That need to be considered are set a longer time limit is not a good thing when you 're working in an environment where the Joomla administration there are many people . When you leave the computer for some reason the Sugar administration area is left open , it will be at risk where people who do not expect to exploit . Unauthorized persons will have direct access to the administration area of ​​your SugarCRM site and do anything .
  You can modification AuthenticationController.php , path location on modules/users/authentication

 public function sessionAuthenticate()
 {
  if(!$this->authenticated){
   $this->authenticated = $this->authController->sessionAuthenticate();
  }
  if($this->authenticated){
   if(!isset($_SESSION['userStats']['pages'])){
       $_SESSION['userStats']['loginTime'] = time();
       $_SESSION['userStats']['pages'] = 0;
   }
   $_SESSION['userStats']['lastTime'] = time();
   $_SESSION['userStats']['pages']++;
            
           $first=$_SESSION['userStats']['lastTime'];
        if($first=="")
        $first=time();
        $_SESSION['userStats']['lastTime'] = time();
        $second=$_SESSION['userStats']['lastTime']; 
        $_SESSION['userStats']['pages']++;
        echo "opo o".$second." - ".$first; exit;
           $idle_time=$second-$first;
        
        if($idle_time>3600)
        {
            $this->logout();
        }          
  }
  return $this->authenticated;
 }
Here is added session timeout 3600 second (1 hours) from no activities. if iddle time more 1 hours, than goto logout. Now, we are go to administrator sugarCRM to rebuilt and repair to changed effect.
SugarCRM Tips

 

We are featured contributor on entrepreneurship for many trusted business sites:

  • Copyright © Kodepedia™ is a registered trademark.
    Designed by Templateism. Hosted on Blogger Platform.