コード例 #1
0
 static function isTrusted()
 {
     $ini = eZINI::instance();
     // Check if current user is trusted user.
     $trustedIPs = $ini->hasVariable('UserSettings', 'TrustedIPList') ? $ini->variable('UserSettings', 'TrustedIPList') : array();
     // Check if IP address of current user is in $trustedIPs array.
     $trustedUser = eZUser::isUserIPInList($trustedIPs);
     if ($trustedUser) {
         return true;
     }
     return false;
 }