/**
  * Get the login time for on e or all users in the specified time interval
  *
  * This function returns the login time for the specified user in the specified interval
  * <br/>Example:
  * <code>
  *	  $interval['from'] = "00000000";
  *	  $interval['to']   = time();
  *	  $time  = EfrontUser :: getLoginTime('jdoe', $interval); //$time['jdoe'] now holds his times
  *	  $times = EfrontUser :: getLoginTime($interval); //$times now holds an array of times for all users
  * </code>
  *
  * @param mixed $login The user to calulate times for, or false for all users
  * @param mixed An array of the form (from =>'', to=>'') or false (return the total login time)
  * @return the total login time as an array of hours, minutes, seconds
  * @since 3.5.0
  * @access public
  */
 public static function getLoginTime($login = false, $interval = array())
 {
     $times = new EfrontTimes($interval);
     if ($login) {
         $result = $times->getUserTotalSessionTime($login);
         return $times->formatTimeForReporting($result);
     } else {
         foreach ($times->getSystemSessionTimesForUsers() as $login => $result) {
             $userTimes[$login] = $times->formatTimeForReporting($result);
             return $userTimes;
         }
     }
 }