mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +00:00
Add user repository as a service
This commit is contained in:
@@ -84,7 +84,7 @@ class API_OAuth2_Account
|
||||
$stmt->closeCursor();
|
||||
|
||||
$this->application_id = (int) $row['application_id'];
|
||||
$this->user = $app['manipulator.user']->getRepository()->find($row['usr_id']);
|
||||
$this->user = $app['repo.users']->find($row['usr_id']);
|
||||
|
||||
$this->api_version = $row['api_version'];
|
||||
$this->revoked = ! ! $row['revoked'];
|
||||
|
@@ -521,7 +521,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
*/
|
||||
private function createAccount($usr_id)
|
||||
{
|
||||
$user = $this->app['manipulator.user']->getRepository()->find($usr_id);
|
||||
$user = $this->app['repo.users']->find($usr_id);
|
||||
|
||||
return API_OAuth2_Account::create($this->app, $user, $this->client);
|
||||
}
|
||||
@@ -794,7 +794,7 @@ class API_OAuth2_Adapter extends OAuth2
|
||||
return false;
|
||||
}
|
||||
|
||||
if (null === $user = $this->app['manipulator.user']->getRepository()->find($usr_id)) {
|
||||
if (null === $user = $this->app['repo.users']->find($usr_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -146,7 +146,7 @@ class API_OAuth2_Application
|
||||
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
$this->creator = ! $row['creator'] ? null : $this->app['manipulator.user']->getRepository()->find($row['creator']);
|
||||
$this->creator = ! $row['creator'] ? null : $this->app['repo.users']->find($row['creator']);
|
||||
$this->type = $row['type'];
|
||||
$this->name = $row['name'];
|
||||
$this->description = $row['description'];
|
||||
|
Reference in New Issue
Block a user