Changeset 152 for lib/session.php

Show
Ignore:
Timestamp:
07/10/06 15:19:44 (7 years ago)
Author:
dez
Message:

Adds new mail check

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lib/session.php

    r139 r152  
    1818public  $username='';           // Username 
    1919public  $fullname;              // Fullname 
     20public  $email=0;               // Email waiting? 
    2021public  $groups  =array();      // users groups 
    2122public  $data='';               // Var/array for session persistant data 
     
    166167                ldap_close($ldap); 
    167168 
     169                // Check the user's email status 
     170                $mailstat = stat("/var/spool/mail/".$user); 
     171                if ($mailstat[size]>0) { 
     172                        if ($mailstat[mtime]>$mailstat[atime]) $this->email = 2; 
     173                        else $this->email = 1; 
     174                } 
     175 
    168176                $this->fullname = $info['cn'][0]; 
    169177                $this->groups = $info['grouplist']; 
     178 
    170179        } 
    171180