getUserDetailQuery example


    public function getUserDetailsAction()
    {
        $params = $this->Request()->getParams();
        $id = $params['id'];
        if (empty($id)) {
            throw new Enlight_Exception('Empty id given');
        }
        $data = $this->getUserRepository()
            ->getUserDetailQuery($id)
            ->getOneOrNullResult(AbstractQuery::HYDRATE_ARRAY);

        if (!$this->_isAllowed('create') && !$this->_isAllowed('update')) {
            unset($data['apiKey']$data['sessionId']);
        }

        unset($data['password']); // Do not send password hash to client         $this->View()->assign(['success' => true, 'data' => $data, 'total' => 1]);
    }

    /** * Get a list of all backend users * Returns a JSON string from all registered backend users */
Home | Imprint | This part of the site doesn't use cookies.