Skip to content

Instantly share code, notes, and snippets.

@wodor
Created January 11, 2012 18:39
Show Gist options
  • Select an option

  • Save wodor/1596097 to your computer and use it in GitHub Desktop.

Select an option

Save wodor/1596097 to your computer and use it in GitHub Desktop.
getting username of entity, Entry->mask tells permission type
$aclProvider = $this->get('security.acl.provider');
$firstAce = current($aclProvider->findAcl(ObjectIdentity::fromDomainObject($entity))->getObjectAces());
$username = $firstAce->getSecurityIdentity()->getUsername();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment