Access Denied Problem in Leaderboard
| Project: | User Points |
| Version: | 6.x-1.0 |
| Component: | Code: userpoints API |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
This is a problem which is probably pretty limited in scope, but I wanted to mention it.
I am starting a new site which uses User Points. We award 10 points for the creation of an account. Due to it being a new site, we only have about 50 registered users so far.
Some of those users haven't activated their account by clicking the link in their email. If anyone clicks on their name in the Leaderboard block, they get access denied rather than a profile page, which makes sense when you consider the account isn't actually active yet.
I'm sure as time goes on and more users build up points so that the default 10 points won't get you on the board anymore, that problem will be solved, but it might be worth considering adding a check to see if the account is actually activated before displaying their name on the Leaderboard.

#1
Interesting ...
As you have more users, this will go away ... But
How are you assigning the 10 points for new users?
Perhaps you should delay awarding those points until the user actually logs in.
Something like this :
<?phpfunction mymodule_user($op, &$edit, &$account) {
// User has logged in
if ($op == 'login') {
// User has logged in for the first time
if (!$account->last) {
// Award the 10 points here
}
}
}
?>