Auth\Controller\Accounts::account PHP Method

account() public method

public account ( $uid = null )
    public function account($uid = null)
    {
        if (!$uid) {
            $uid = $this->user["_id"];
        }
        $account = $this->app->db->findOne("cockpit/accounts", ["_id" => $uid]);
        if (!$account) {
            return false;
        }
        unset($account["password"]);
        $languages = $this->getLanguages();
        $groups = $this->getGroups();
        return $this->render('auth:views/accounts/account.php', compact('account', 'uid', 'languages', 'groups'));
    }