Changeset 24125
- Timestamp:
- 11/18/09 11:28:24 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfUnobstrusiveWidgetPlugin/trunk/lib/widget/navigation/menu/sfUoWidgetAdminMenu.class.php
r21399 r24125 124 124 if (is_array($values) && array_key_exists($fieldName, $values) && !empty($values[$fieldName])) 125 125 { 126 if (!$this->isAuthenticated() )126 if (!$this->isAuthenticated() || !method_exists($this->getUser(), $method)) 127 127 { 128 128 return false; … … 157 157 158 158 $isSuperAdminMethod = $this->getOption('is_super_admin_method'); 159 return $this->getUser()->$isSuperAdminMethod();159 return method_exists($this->getUser(), $isSuperAdminMethod) ? $this->getUser()->$isSuperAdminMethod() : false; 160 160 } 161 161 … … 168 168 { 169 169 $isAuthenticatedMethod = $this->getOption('is_authenticated_method'); 170 return $this->getUser()->$isAuthenticatedMethod();170 return method_exists($this->getUser(), $isAuthenticatedMethod) ? $this->getUser()->$isAuthenticatedMethod() : false; 171 171 } 172 172 }