From ed3514b89d786b73dfad9d7dd4e4d6c92e9fa23b Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 16 Feb 2017 18:14:26 +0200 Subject: [PATCH] registration --- app/library/App/Controllers/UserController.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) diff --git a/app/library/App/Controllers/UserController.php b/app/library/App/Controllers/UserController.php index 7a2f2be..dd81756 100755 --- a/app/library/App/Controllers/UserController.php +++ b/app/library/App/Controllers/UserController.php @@ -90,4 +90,21 @@ class UserController extends CrudResourceController { return 'id'; } + + protected function getFindData($id) + { + $phqlBuilder = $this->phqlQueryParser->fromQuery($this->query, $this->getResource()); + + $phqlBuilder + ->andWhere('[' . $this->getResource()->getModel() . '].' . $this->getModelPrimaryKey() . ' = :id:', + ['id' => $id]) + ->limit(1); + + $this->modifyReadQuery($phqlBuilder); + $this->modifyFindQuery($phqlBuilder, $id); + + $results = $phqlBuilder->getQuery()->execute(); + + return count($results) >= 1 ? $results->getFirst() : null; + } } -- libgit2 0.21.4