Minor - add int cast

pull/2487/head
jmontoyaa 9 years ago
parent f65ccc774e
commit 63c57a5f22
  1. 3
      main/inc/lib/usergroup.lib.php

@ -529,6 +529,7 @@ class UserGroup extends Model
*/ */
public function getUserGroupListByUser($userId, $filterByType = null) public function getUserGroupListByUser($userId, $filterByType = null)
{ {
$userId = (int) $userId;
if ($this->useMultipleUrl) { if ($this->useMultipleUrl) {
$urlId = api_get_current_access_url_id(); $urlId = api_get_current_access_url_id();
$from = $this->usergroup_rel_user_table." u $from = $this->usergroup_rel_user_table." u
@ -547,7 +548,7 @@ class UserGroup extends Model
} }
if ($filterByType !== null) { if ($filterByType !== null) {
$where['where'][' AND g.group_type = ?'] = intval($filterByType); $where['where'][' AND g.group_type = ?'] = (int) $filterByType;
} }
$results = Database::select( $results = Database::select(

Loading…
Cancel
Save