Skip to content

Commit 6f83063

Browse files
committed
Minor - avoid custom code, use findUserByUsername.
1 parent aa48b77 commit 6f83063

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/inc/lib/webservices/WebService.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22
/* For licensing terms, see /license.txt */
3+
34
use Chamilo\UserBundle\Entity\User;
45

56
/**
@@ -77,8 +78,7 @@ public static function isValidUser($username, $password)
7778
return false;
7879
}
7980

80-
/** @var \Chamilo\UserBundle\Entity\User $user */
81-
$user = UserManager::getRepository()->findOneBy(['username' => $username]);
81+
$user = UserManager::getManager()->findUserByUsername($username);
8282

8383
if (!$user) {
8484
return false;

0 commit comments

Comments
 (0)