// Check default scope (non-private notices)
$inScope = (!$this->isPrivateScope());
- // Get current user
- $user = common_current_user();
+ // Get current profile
+ $profile = Profile::current();
// Is the general scope check okay and the user in logged in?
- /* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . ']: inScope=' . intval($inScope) . ',user[]=' . gettype($user));
- if (($inScope === TRUE) && ($user instanceof User)) {
- // Get profile from it
- $profile = $user->getProfile();
- /* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . ']: inScope=' . intval($inScope) . ',profile[]=' . gettype($profile));
-
+ /* NOISY-DEBUG: */ common_debug('[' . __METHOD__ . ':' . __LINE__ . ']: inScope=' . intval($inScope) . ',profile[]=' . gettype($profile));
+ if (($inScope === TRUE) && ($profile instanceof Profile)) {
/*
* Check scope, else a privacy leaks happens this way:
*