Completed
Push — master ( 65f314...a56b5d )
by Paweł
08:26
created

UserProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 0
cts 3
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findOneByEmail() 0 6 1
A findOneByExternalId() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Core Bundle.
5
 *
6
 * Copyright 2015 Sourcefabric z.u. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2015 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Bundle\CoreBundle\Security\Provider;
16
17
use FOS\UserBundle\Security\UserProvider as FOSUserProvider;
18
19
class UserProvider extends FOSUserProvider
20
{
21
    public function findOneByEmail($email)
22
    {
23
        return $this->userManager->findUserBy([
24
            'email' => $email,
25
        ]);
26
    }
27
28
    public function findOneByExternalId($externalId)
29
    {
30
        return $this->userManager->findUserBy([
31
            'externalId' => $externalId,
32
        ]);
33
    }
34
}
35