Skip to content

Instantly share code, notes, and snippets.

@Anselme
Created June 25, 2013 15:52
Show Gist options
  • Save Anselme/5859605 to your computer and use it in GitHub Desktop.
Save Anselme/5859605 to your computer and use it in GitHub Desktop.
<?php
namespace Cdt\UserBundle\Api;
use Cdt\UserBundle\Entity\User;
class UserTools
{
public function areInSameStructure($user1, $user2)
{
return $user1->getStructure() == $user2->getStructure();
//return $this->container->get('security.context')->getToken()->getUser() == $user->getStructure();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment