src/User/Service/User.php
public function checkIfAdmin(UserEntity $user) 
   {
		$auth = $this->getServiceLocator()->get('ControllerPluginManager')
			->get('zfcUserAuthentication');
		$identity = $auth->hasIdentity() ? $auth->getIdentity() : null;
		
		if(null === $identity) {
			return false;
		}
		
		if('god' != $identity->getRole()) {
			return false;
		}
		
    	return true;
   }
public function checkIfAdmin(UserEntity $user) 
   {
		$auth = $this->getServiceLocator()->get('ControllerPluginManager')
			->get('zfcUserAuthentication');
		$identity = $auth->hasIdentity() ? $auth->getIdentity() : null;
		
		if(null === $identity) {
			return false;
		}
		
		if('god' != $identity->getRole()) {
			return false;
		}
		
    	return true;
   }
Verifica se l'utente connesso è admin

@param User $user
@return boolean