We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e95fab commit 4217815Copy full SHA for 4217815
src/libraries/User.php
@@ -5,6 +5,7 @@
5
use \BNETDocs\Libraries\Credits;
6
use \BNETDocs\Libraries\Exceptions\QueryException;
7
use \BNETDocs\Libraries\Exceptions\UserNotFoundException;
8
+use \BNETDocs\Libraries\Exceptions\UserProfileNotFoundException;
9
use \BNETDocs\Libraries\UserProfile;
10
use \CarlBennett\MVC\Libraries\Common;
11
use \CarlBennett\MVC\Libraries\Database;
@@ -462,7 +463,11 @@ public function getUsername() {
462
463
}
464
465
public function getUserProfile() {
- return new UserProfile($this->id);
466
+ try {
467
+ return new UserProfile($this->id);
468
+ } catch (UserProfileNotFoundException $e) {
469
+ return null;
470
+ }
471
472
473
public function getVerifiedDateTime() {
0 commit comments