Created
December 15, 2010 13:36
-
-
Save mrchrisadams/741940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sites/all/modules/contrib/userpoints/userpoints.module b/sites/all/modules/contrib/userpoints/userpoints.module | |
index 412bce7..d80609b 100644 | |
--- a/sites/all/modules/contrib/userpoints/userpoints.module | |
+++ b/sites/all/modules/contrib/userpoints/userpoints.module | |
@@ -174,13 +174,7 @@ function userpoints_menu() { | |
* @return true if user has permissions to view userpoints and if the user is logged in | |
*/ | |
function userpoints_access_my_points() { | |
- global $user; | |
- if ($user->uid === 1 || user_access('USERPOINTS_PERM_ADMIN')) { | |
- return TRUE; | |
- } | |
- return ( _userpoints_user_exists($user->uid) && | |
- ((user_access(USERPOINTS_PERM_VIEW) && user_is_logged_in()) || user_access(USERPOINTS_PERM_VIEW_OWN)) | |
- ); | |
+return true; | |
} | |
/** | |
@@ -1671,17 +1665,7 @@ function userpoints_list_my_userpoints() { | |
// User which are displaying points for | |
$uid = (int)arg(1); | |
- if ($uid) { | |
- if ($uid != $user->uid) { | |
- // If not the same as logged in user | |
- drupal_access_denied(); | |
- return; | |
- } | |
- } | |
- else { | |
- // Default to currently logged in user | |
- $uid = $user->uid; | |
- } | |
+ | |
$point_user = user_load(array('uid' => $uid)); | |
// Check permissions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment