From 7ff02bb7d4483b3dc24edd78551a3936798056a8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 26 Sep 2008 10:50:08 -0400 Subject: try to clean up user-without-profile errors darcs-hash:20080926145008-5ed1f-8a60ed3c5adbfe75aa044732e8d10dbdb9b93089.gz --- actions/remotesubscribe.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actions/remotesubscribe.php') 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); } -- cgit v1.2.3-54-g00ecf