summaryrefslogtreecommitdiff
path: root/actions/remotesubscribe.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/remotesubscribe.php')
-rw-r--r--actions/remotesubscribe.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php
index c2c00ab61..7137b42a2 100644
--- a/actions/remotesubscribe.php
+++ b/actions/remotesubscribe.php
@@ -313,7 +313,14 @@ class RemotesubscribeAction extends Action {
$req->set_parameter('omb_listenee_profile', common_profile_url($user->nickname));
$req->set_parameter('omb_listenee_nickname', $user->nickname);
$req->set_parameter('omb_listenee_license', $config['license']['url']);
+
$profile = $user->getProfile();
+ if (!$profile) {
+ common_log_db_error($user, 'SELECT', __FILE__);
+ $this->server_error(_('User without matching profile'));
+ return;
+ }
+
if ($profile->fullname) {
$req->set_parameter('omb_listenee_fullname', $profile->fullname);
}