Skip to content

Commit

Permalink
[DoctrineBundle][DoctrineMongoDBBundle] Makes it possible to use shor…
Browse files Browse the repository at this point in the history
…tcuts for defining document or entity classes when using the DaoAuthenticationProvider
  • Loading branch information
Henrik Bjørnskov authored and fabpot committed Dec 30, 2010
1 parent 42d2f83 commit 46949e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -16,6 +16,11 @@ class EntityUserProvider implements UserProviderInterface
public function __construct($em, $class, $property = null)
{
$this->class = $class;

if (false !== strpos($this->class, ':')) {
$this->class = $em->getClassMetadata($class)->getName();
}

$this->repository = $em->getRepository($class);
$this->property = $property;
}
Expand Down
Expand Up @@ -16,6 +16,11 @@ class DocumentUserProvider implements UserProviderInterface
public function __construct($em, $class, $property = null)
{
$this->class = $class;

if (false !== strpos($this->class, ':')) {
$this->class = $em->getClassMetadata($class)->getName();
}

$this->repository = $em->getRepository($class);
$this->property = $property;
}
Expand Down

0 comments on commit 46949e2

Please sign in to comment.