Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Fix regression causing UserModel error. Fixes #265
Browse files Browse the repository at this point in the history
This commit fixes a regression introduced in b44c9ab (Add parameters
to fix the MIDAS API display)
  • Loading branch information
jcfr committed Mar 6, 2017
1 parent 30c6dda commit 549525a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion core/controllers/components/ApiuserComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ public function userList($args)
/** @var UserModel $userModel */
$userModel = MidasLoader::loadModel('User');

return $userModel->getAll(true, $args['limit'], array('firstname','lastname','company','website'));
return $userModel->getAll(
/* $onlyPublic = */ true,
/* $limit = */ $args['limit'],
/* $order = */ 'lastname',
/* $offset = */ null,
/* $currentUser = */ null,
/* $fields = */ array('firstname','lastname','company','website')
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/models/pdo/UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getUserCommunities($userDao)
}

/** Get all */
public function getAll($onlyPublic = false, $limit = 20, $fields = array('*'), $order = 'lastname', $offset = null, $currentUser = null)
public function getAll($onlyPublic = false, $limit = 20, $order = 'lastname', $offset = null, $currentUser = null, $fields = array('*'))
{
$sql = $this->database->select();
$sql->from("user", $fields);
Expand Down

0 comments on commit 549525a

Please sign in to comment.