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

UserProvider::findOneByExternalId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
cc 1
nc 1
nop 1
crap 2
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