diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-09 08:11:33 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-09 08:11:33 +0000 |
commit | 046d8767dfc7a2162ab242815b75036589eacd0e (patch) | |
tree | 9043d9572544c4e73c7c24e3b1a69f991724712a /engine/lib | |
parent | 0fcb238b2090a8f3ef95852b9cf6b3e27f2f811f (diff) | |
download | elgg-046d8767dfc7a2162ab242815b75036589eacd0e.tar.gz elgg-046d8767dfc7a2162ab242815b75036589eacd0e.tar.bz2 |
Closes #584: Removed exception, get_user will now return false if GUID exists but is not a user. This probably makes more sense as Exceptions should probably be reserved for major Ooopses.
The error in this bug was caused by this exception being thrown and not caught in the access group handler. This may have been the cause of a number of group related / permission related errors.
git-svn-id: https://code.elgg.org/elgg/trunk@2682 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/users.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index a63092148..ca68c0fed 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -732,7 +732,6 @@ * This function returns an ElggUser from a given GUID.
* @param int $guid The GUID
* @return ElggUser|false
- * @throws InvalidParameterException if $GUID exists but is not an ElggUser.
*/
function get_user($guid)
{
@@ -740,7 +739,8 @@ $result = get_entity($guid);
if ((!empty($result)) && (!($result instanceof ElggUser)))
- throw new InvalidClassException(sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, 'ElggUser'));
+ //throw new InvalidClassException(sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, 'ElggUser'));
+ return false;
if (!empty($result))
return $result;
|