Permalink
Browse files

Adds join for user permission check.

  • Loading branch information...
1 parent 5f83f3a commit cff1885c6c51b8c3a6aed9b8ebbd6c5f85acfe96 @elplatt committed Oct 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 crm/include/core/sys/user.inc.php
@@ -334,7 +334,7 @@ function user_access ($permission) {
}
// Get list of the users roles and check each for the permission
- $data = user_data(array('cid'=>user_id()));
+ $data = user_data(array('cid'=>user_id(), 'join'=>array('permission')));
return in_array($permission, $data[0]['permissions']);
}

0 comments on commit cff1885

Please sign in to comment.