Commit c00491cd authored by mmn's avatar mmn

Cosmetic changes to common_redirect, clientError, serverError

Since these functions exit (or throw exception) after running, there
is no need to have a 'return' statement or similar afterwards.
parent acbe9493
......@@ -77,7 +77,6 @@ class AddpeopletagAction extends Action
// TRANS: Client error displayed when the session token does not match or is not given.
$this->clientError(_('There was a problem with your session token.'.
' Try again, please.'));
return false;
}
// Only for logged-in users
......@@ -87,7 +86,6 @@ class AddpeopletagAction extends Action
if (empty($this->user)) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return false;
}
// Profile to subscribe to
......@@ -99,7 +97,6 @@ class AddpeopletagAction extends Action
if (empty($this->tagged)) {
// TRANS: Client error displayed trying to perform an action related to a non-existing profile.
$this->clientError(_('No such profile.'));
return false;
}
$id = $this->arg('peopletag_id');
......@@ -108,7 +105,6 @@ class AddpeopletagAction extends Action
if (empty($this->peopletag)) {
// TRANS: Client error displayed trying to reference a non-existing list.
$this->clientError(_('No such list.'));
return false;
}
return true;
......@@ -144,7 +140,6 @@ class AddpeopletagAction extends Action
'The remote server is probably not responding correctly. ' .
'Please try retrying later.'), $this->profile->profileurl));
}
return false;
}
if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8');
......
......@@ -67,7 +67,6 @@ class AllrssAction extends Rss10Action
if (!$this->user) {
// TRANS: Client error when user not found for an rss related action.
$this->clientError(_('No such user.'));
return false;
} else {
$this->notices = $this->getNotices($this->limit);
return true;
......
......@@ -84,7 +84,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
404,
$this->format
);
return;
}
// Note: Twitter no longer supports IM
......@@ -93,7 +92,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
// TRANS: Client error displayed when no valid device parameter is provided for a user's delivery device setting.
$this->clientError(_( 'You must specify a parameter named ' .
'\'device\' with a value of one of: sms, im, none.' ));
return;
}
if (empty($this->user)) {
......@@ -124,7 +122,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
common_log_db_error($this->user, 'UPDATE', __FILE__);
// TRANS: Server error displayed when a user's delivery device cannot be updated.
$this->serverError(_('Could not update user.'));
return;
}
$profile = $this->user->getProfile();
......
......@@ -92,7 +92,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
if (empty($profile)) {
// TRANS: Error message displayed when referring to a user without a profile.
$this->clientError(_('User has no profile.'));
return;
}
$original = clone($profile);
......@@ -128,7 +127,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
common_log_db_error($profile, 'UPDATE', __FILE__);
// TRANS: Server error displayed if a user profile could not be saved.
$this->serverError(_('Could not save profile.'));
return;
}
$twitter_user = $this->twitterUserArray($profile, true);
......
......@@ -64,7 +64,6 @@ class ApiAccountVerifyCredentialsAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), $code = 404);
return;
}
$twitter_user = $this->twitterUserArray($this->auth_user->getProfile(), true);
......
......@@ -120,7 +120,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404);
return;
}
if (empty($this->source)) {
......@@ -129,7 +128,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
_('Could not determine source user.'),
404
);
return;
}
if (empty($this->target)) {
......@@ -138,7 +136,6 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction
_('Could not find target user.'),
404
);
return;
}
$result = $this->twitterRelationshipArray($this->source, $this->target);
......
......@@ -63,7 +63,6 @@ class ApiMediaUploadAction extends ApiAuthAction
_('This method requires a POST.'),
400, $this->format
);
return;
}
// Workaround for PHP returning empty $_POST and $_FILES when POST
......@@ -79,7 +78,6 @@ class ApiMediaUploadAction extends ApiAuthAction
'The server was unable to handle that much POST data (%s bytes) due to its current configuration.',
intval($_SERVER['CONTENT_LENGTH']));
$this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
return;
}
$upload = null;
......@@ -88,7 +86,6 @@ class ApiMediaUploadAction extends ApiAuthAction
$upload = MediaFile::fromUpload('media', $this->auth_user->getProfile());
} catch (Exception $e) {
$this->clientError($e->getMessage(), $e->getCode());
return;
}
if (isset($upload)) {
......@@ -96,7 +93,6 @@ class ApiMediaUploadAction extends ApiAuthAction
} else {
// TRANS: Client error displayed when uploading a media file has failed.
$this->clientError(_('Upload failed.'));
return;
}
}
......
......@@ -80,7 +80,6 @@ class ApiOAuthAccessTokenAction extends ApiOAuthAction
common_debug(var_export($req, true));
$code = $e->getCode();
$this->clientError($e->getMessage(), empty($code) ? 401 : $code, 'text');
return;
}
if (empty($atok)) {
......
......@@ -101,7 +101,6 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
if (!in_array($this->format, array('xml', 'json', 'atom'))) {
// TRANS: Client error displayed when coming across a non-supported API method.
$this->clientError(_('API method not found.'), 404);
return;
}
switch ($_SERVER['REQUEST_METHOD']) {
......@@ -114,7 +113,6 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
default:
// TRANS: Client error displayed calling an unsupported HTTP error in API status show.
$this->clientError(_('HTTP method not supported.'), 405);
return;
}
}
......@@ -223,7 +221,6 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
if ($this->format != 'atom') {
// TRANS: Client error displayed when trying to delete a notice not using the Atom format.
$this->clientError(_('Can only delete using the Atom format.'));
return;
}
if (empty($this->auth_user) ||
......@@ -231,7 +228,6 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction
!$this->auth_user->hasRight(Right::DELETEOTHERSNOTICE))) {
// TRANS: Client error displayed when a user has no rights to delete notices of other users.
$this->clientError(_('Cannot delete this notice.'), 403);
return;
}
if (Event::handle('StartDeleteOwnNotice', array($this->auth_user, $this->notice))) {
......
......@@ -57,7 +57,6 @@ class ApprovegroupAction extends Action
if (!common_logged_in()) {
// TRANS: Client error displayed when trying to leave a group while not logged in.
$this->clientError(_('You must be logged in to leave a group.'));
return false;
}
$nickname_arg = $this->trimmed('nickname');
......@@ -72,7 +71,6 @@ class ApprovegroupAction extends Action
if ($nickname_arg != $nickname) {
$args = array('nickname' => $nickname);
common_redirect(common_local_url('leavegroup', $args), 301);
return false;
}
$local = Local_group::getKV('nickname', $nickname);
......@@ -80,27 +78,23 @@ class ApprovegroupAction extends Action
if (!$local) {
// TRANS: Client error displayed when trying to leave a non-local group.
$this->clientError(_('No such group.'), 404);
return false;
}
$this->group = User_group::getKV('id', $local->group_id);
} else {
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
$this->clientError(_('No nickname or ID.'), 404);
return false;
}
if (!$this->group) {
// TRANS: Client error displayed when trying to leave a non-existing group.
$this->clientError(_('No such group.'), 404);
return false;
}
$cur = common_current_user();
if (empty($cur)) {
// TRANS: Client error displayed trying to approve group membership while not logged in.
$this->clientError(_('Must be logged in.'), 403);
return false;
}
if ($this->arg('profile_id')) {
if ($cur->isAdmin($this->group)) {
......@@ -108,12 +102,10 @@ class ApprovegroupAction extends Action
} else {
// TRANS: Client error displayed trying to approve group membership while not a group administrator.
$this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
return false;
}
} else {
// TRANS: Client error displayed trying to approve group membership without specifying a profile to approve.
$this->clientError(_('Must specify a profile.'));
return false;
}
$this->request = Group_join_queue::pkeyGet(array('profile_id' => $this->profile->id,
......@@ -186,9 +178,7 @@ class ApprovegroupAction extends Action
$this->elementEnd('body');
$this->endHTML();
} else {
common_redirect(common_local_url('groupmembers', array('nickname' =>
$this->group->nickname)),
303);
common_redirect(common_local_url('groupmembers', array('nickname' => $this->group->nickname)), 303);
}
}
}
......@@ -58,14 +58,12 @@ class ApprovesubAction extends Action
if (empty($cur)) {
// TRANS: Client error displayed trying to approve group membership while not logged in.
$this->clientError(_('Must be logged in.'), 403);
return false;
}
if ($this->arg('profile_id')) {
$this->profile = Profile::getKV('id', $this->arg('profile_id'));
} else {
// TRANS: Client error displayed trying to approve subscriptionswithout specifying a profile to approve.
$this->clientError(_('Must specify a profile.'));
return false;
}
$this->request = Subscription_queue::pkeyGet(array('subscriber' => $this->profile->id,
......
......@@ -118,7 +118,6 @@ class AtompubshowsubscriptionAction extends ApiAuthAction
default:
// TRANS: Client error shown when using a non-supported HTTP method.
$this->clientError(_('HTTP method not supported.'), 405);
return;
}
return;
......
......@@ -105,7 +105,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
default:
// TRANS: Client exception thrown when using an unsupported HTTP method.
$this->clientError(_('HTTP method not supported.'), 405);
return;
}
return;
......@@ -232,7 +231,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$dom->documentElement->localName != 'entry') {
// TRANS: Client error displayed when not using an Atom entry.
$this->clientError(_('Atom post must be an Atom entry.'));
return;
}
$activity = new Activity($dom->documentElement);
......@@ -244,7 +242,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
if ($activity->verb != ActivityVerb::FOLLOW) {
// TRANS: Client error displayed when not using the follow verb.
$this->clientError(_('Can only handle Follow activities.'));
return;
}
$person = $activity->objects[0];
......@@ -252,7 +249,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
if ($person->type != ActivityObject::PERSON) {
// TRANS: Client exception thrown when subscribing to an object that is not a person.
$this->clientError(_('Can only follow people.'));
return;
}
// XXX: OStatus discovery (maybe)
......@@ -263,7 +259,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
// TRANS: Client exception thrown when subscribing to a non-existing profile.
// TRANS: %s is the unknown profile ID.
$this->clientError(sprintf(_('Unknown profile %s.'), $person->id));
return;
}
if (Subscription::exists($this->_profile, $profile)) {
......@@ -273,7 +268,6 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
$this->clientError(sprintf(_('Already subscribed to %s.'),
$person->id),
409);
return;
}
if (Subscription::start($this->_profile, $profile)) {
......
......@@ -71,7 +71,6 @@ class AttachmentAction extends Action
if (empty($this->attachment)) {
// TRANS: Client error displayed trying to get a non-existing attachment.
$this->clientError(_('No such attachment.'), 404);
return false;
}
return true;
}
......
......@@ -106,7 +106,6 @@ class AvatarsettingsAction extends SettingsAction
common_log_db_error($user, 'SELECT', __FILE__);
// TRANS: Error message displayed when referring to a user without a profile.
$this->serverError(_('User has no profile.'));
return;
}
$this->elementStart('form', array('enctype' => 'multipart/form-data',
......@@ -195,7 +194,6 @@ class AvatarsettingsAction extends SettingsAction
common_log_db_error($user, 'SELECT', __FILE__);
// TRANS: Error message displayed when referring to a user without a profile.
$this->serverError(_('User has no profile.'));
return;
}
$this->elementStart('form', array('method' => 'post',
......@@ -362,7 +360,6 @@ class AvatarsettingsAction extends SettingsAction
if (!$filedata) {
// TRANS: Server error displayed if an avatar upload went wrong somehow server side.
$this->serverError(_('Lost our file data.'));
return;
}
$file_d = ($filedata['width'] > $filedata['height'])
......
......@@ -66,7 +66,6 @@ class BlockAction extends ProfileFormAction
if ($cur->hasBlocked($this->profile)) {
// TRANS: Client error displayed when blocking a user that has already been blocked.
$this->clientError(_('You already blocked that user.'));
return false;
}
return true;
......@@ -187,7 +186,6 @@ class BlockAction extends ProfileFormAction
if (!$result) {
// TRANS: Server error displayed when blocking a user fails.
$this->serverError(_('Failed to save block information.'));
return;
}
}
......
......@@ -65,13 +65,11 @@ class BlockedfromgroupAction extends GroupAction
$args['page'] = $this->page;
}
common_redirect(common_local_url('blockedfromgroup', $args), 301);
return false;
}
if (!$nickname) {
// TRANS: Client error displayed when requesting a list of blocked users for a group without providing a group nickname.
$this->clientError(_('No nickname.'), 404);
return false;
}
$local = Local_group::getKV('nickname', $nickname);
......@@ -79,7 +77,6 @@ class BlockedfromgroupAction extends GroupAction
if (!$local) {
// TRANS: Client error displayed when requesting a list of blocked users for a non-local group.
$this->clientError(_('No such group.'), 404);
return false;
}
$this->group = User_group::getKV('id', $local->group_id);
......@@ -87,7 +84,6 @@ class BlockedfromgroupAction extends GroupAction
if (!$this->group) {
// TRANS: Client error displayed when requesting a list of blocked users for a non-existing group.
$this->clientError(_('No such group.'), 404);
return false;
}
return true;
......
......@@ -57,7 +57,6 @@ class CancelgroupAction extends Action
if (!common_logged_in()) {
// TRANS: Client error displayed when trying to leave a group while not logged in.
$this->clientError(_('You must be logged in to leave a group.'));
return false;
}
$nickname_arg = $this->trimmed('nickname');
......@@ -71,7 +70,6 @@ class CancelgroupAction extends Action
if ($nickname_arg != $nickname) {
$args = array('nickname' => $nickname);
common_redirect(common_local_url('leavegroup', $args), 301);
return false;
}
$local = Local_group::getKV('nickname', $nickname);
......@@ -79,27 +77,23 @@ class CancelgroupAction extends Action
if (!$local) {
// TRANS: Client error displayed when trying to leave a non-local group.
$this->clientError(_('No such group.'), 404);
return false;
}
$this->group = User_group::getKV('id', $local->group_id);
} else {
// TRANS: Client error displayed when trying to leave a group without providing a group name or group ID.
$this->clientError(_('No nickname or ID.'), 404);
return false;
}
if (!$this->group) {
// TRANS: Client error displayed when trying to leave a non-existing group.
$this->clientError(_('No such group.'), 404);
return false;
}
$cur = common_current_user();
if (empty($cur)) {
// TRANS: Client error displayed when trying to leave a group while not logged in.
$this->clientError(_('Must be logged in.'), 403);
return false;
}
if ($this->arg('profile_id')) {
if ($cur->isAdmin($this->group)) {
......@@ -108,7 +102,6 @@ class CancelgroupAction extends Action
// TRANS: Client error displayed when trying to approve or cancel a group join request without
// TRANS: being a group administrator.
$this->clientError(_('Only group admin can approve or cancel join requests.'), 403);
return false;
}
} else {
$this->profile = $cur->getProfile();
......@@ -164,9 +157,7 @@ class CancelgroupAction extends Action
$this->elementEnd('body');
$this->endHTML();
} else {
common_redirect(common_local_url('groupmembers', array('nickname' =>
$this->group->nickname)),
303);
common_redirect(common_local_url('groupmembers', array('nickname' => $this->group->nickname)), 303);
}
}
}
......@@ -55,7 +55,6 @@ class CancelsubscriptionAction extends Action
if (!common_logged_in()) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
return;
}
$user = common_current_user();
......@@ -63,7 +62,6 @@ class CancelsubscriptionAction extends Action
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
common_redirect(common_local_url('subscriptions',
array('nickname' => $user->nickname)));
return;
}
/* Use a session token for CSRF protection. */
......@@ -74,7 +72,6 @@ class CancelsubscriptionAction extends Action
// TRANS: Client error displayed when the session token does not match or is not given.
$this->clientError(_('There was a problem with your session token. ' .
'Try again, please.'));
return;
}
$other_id = $this->arg('unsubscribeto');
......@@ -82,7 +79,6 @@ class CancelsubscriptionAction extends Action
if (!$other_id) {
// TRANS: Client error displayed when trying to leave a group without specifying an ID.
$this->clientError(_('No profile ID in request.'));
return;
}
$other = Profile::getKV('id', $other_id);
......@@ -90,7 +86,6 @@ class CancelsubscriptionAction extends Action
if (!$other) {
// TRANS: Client error displayed when trying to leave a non-existing group.
$this->clientError(_('No profile with that ID.'));
return;
}
$this->request = Subscription_queue::pkeyGet(array('subscriber' => $user->id,
......
......@@ -66,25 +66,21 @@ class ConfirmaddressAction extends Action
if (!common_logged_in()) {
common_set_returnto($this->selfUrl());
common_redirect(common_local_url('login'));
return;
}
$code = $this->trimmed('code');
if (!$code) {
// TRANS: Client error displayed when not providing a confirmation code in the contact address confirmation action.
$this->clientError(_('No confirmation code.'));
return;
}
$confirm = Confirm_address::getKV('code', $code);
if (!$confirm) {
// TRANS: Client error displayed when providing a non-existing confirmation code in the contact address confirmation action.
$this->clientError(_('Confirmation code not found.'));
return;
}
$cur = common_current_user();
if ($cur->id != $confirm->user_id) {
// TRANS: Client error displayed when not providing a confirmation code for another user in the contact address confirmation action.
$this->clientError(_('That confirmation code is not for you!'));
return;
}
$type = $confirm->address_type;
$transports = array();
......@@ -92,7 +88,6 @@ class ConfirmaddressAction extends Action
if (!in_array($type, array('email', 'sms')) && !in_array($type, array_keys($transports))) {
// TRANS: Server error for an unknown address type, which can be 'email', 'sms', or the name of an IM network (such as 'xmpp' or 'aim')
$this->serverError(sprintf(_('Unrecognized address type %s'), $type));
return;
}
$this->address = $confirm->address;
$cur->query('BEGIN');
......@@ -101,7 +96,6 @@ class ConfirmaddressAction extends Action
if ($cur->$type == $confirm->address) {
// TRANS: Client error for an already confirmed email/jabber/sms address.
$this->clientError(_('That address has already been confirmed.'));
return;
}
$orig_user = clone($cur);
......@@ -120,7 +114,6 @@ class ConfirmaddressAction extends Action
common_log_db_error($cur, 'UPDATE', __FILE__);
// TRANS: Server error displayed when confirming an e-mail address or IM address fails.
$this->serverError(_('Could not update user.'));
return;
}
if ($type == 'email') {
......@@ -136,7 +129,6 @@ class ConfirmaddressAction extends Action
if($user_im_prefs->screenname == $confirm->address){
// TRANS: Client error for an already confirmed IM address.
$this->clientError(_('That address has already been confirmed.'));
return;
}
$user_im_prefs->screenname = $confirm->address;
$result = $user_im_prefs->update();
......@@ -145,7 +137,6 @@ class ConfirmaddressAction extends Action
common_log_db_error($user_im_prefs, 'UPDATE', __FILE__);
// TRANS: Server error displayed when updating IM preferences fails.
$this->serverError(_('Could not update user IM preferences.'));
return;
}
}else{
$user_im_prefs = new User_im_prefs();
......@@ -158,7 +149,6 @@ class ConfirmaddressAction extends Action
common_log_db_error($user_im_prefs, 'INSERT', __FILE__);
// TRANS: Server error displayed when adding IM preferences fails.
$this->serverError(_('Could not insert user IM preferences.'));
return;
}
}
......@@ -171,7 +161,6 @@ class ConfirmaddressAction extends Action
// TRANS: Server error displayed when an address confirmation code deletion from the
// TRANS: database fails in the contact address confirmation action.
$this->serverError(_('Could not delete address confirmation.'));
return;
}
$cur->query('COMMIT');
......
......@@ -60,7 +60,6 @@ class DeleteapplicationAction extends Action
if (!common_logged_in()) {
// TRANS: Client error displayed trying to delete an application while not logged in.
$this->clientError(_('You must be logged in to delete an application.'));
return false;
}
$id = (int)$this->arg('id');
......@@ -69,7 +68,6 @@ class DeleteapplicationAction extends Action
if (empty($this->app)) {
// TRANS: Client error displayed trying to delete an application that does not exist.
$this->clientError(_('Application not found.'));
return false;
}
$cur = common_current_user();
......@@ -77,7 +75,6 @@ class DeleteapplicationAction extends Action
if ($cur->id != $this->app->owner) {
// TRANS: Client error displayed trying to delete an application the current user does not own.
$this->clientError(_('You are not the owner of this application.'), 401);
return false;
}
return true;
......@@ -101,7 +98,6 @@ class DeleteapplicationAction extends Action
if (!$token || $token != common_session_token()) {
// TRANS: Client error displayed when the session token does not match or is not given.
$this->clientError(_('There was a problem with your session token.'));
return;
}
if ($this->arg('no')) {
......
......@@ -62,7 +62,6 @@ class DeletegroupAction extends RedirectingAction
if (!common_logged_in()) {
// TRANS: Client error when trying to delete group while not logged in.
$this->clientError(_('You must be logged in to delete a group.'));
return false;
}
$nickname_arg = $this->trimmed('nickname');
......@@ -77,7 +76,6 @@ class DeletegroupAction extends RedirectingAction
if ($nickname_arg != $nickname) {
$args = array('nickname' => $nickname);
common_redirect(common_local_url('leavegroup', $args), 301);
return false;
}
$local = Local_group::getKV('nickname', $nickname);
......@@ -85,27 +83,23 @@ class DeletegroupAction extends RedirectingAction
if (!$local) {
// TRANS: Client error when trying to delete a non-local group.
$this->clientError(_('No such group.'), 404);
return false;
}
$this->group = User_group::getKV('id', $local->group_id);
} else {
// TRANS: Client error when trying to delete a group without providing a nickname or ID for the group.
$this->clientError(_('No nickname or ID.'), 404);
return false;
}
if (!$this->group) {
// TRANS: Client error when trying to delete a non-existing group.
$this->clientError(_('No such group.'), 404);
return false;
}
$cur = common_current_user();
if (!$cur->hasRight(Right::DELETEGROUP)) {
// TRANS: Client error when trying to delete a group without having the rights to delete it.
$this->clientError(_('You are not allowed to delete this group.'), 403);
return false;
}
return true;
......@@ -166,8 +160,7 @@ class DeletegroupAction extends RedirectingAction
} else {
// @fixme if we could direct to the page on which this group
// would have shown... that would be awesome
common_redirect(common_local_url('groups'),
303);
common_redirect(common_local_url('groups'), 303);
}
}
......
......@@ -64,7 +64,6 @@ class DeleteuserAction extends ProfileFormAction
if (!$cur->hasRight(Right::DELETEUSER)) {
// TRANS: Client error displayed when trying to delete a user without having the right to delete users.
$this->clientError(_('You cannot delete users.'));
return false;
}
$this->user = User::getKV('id', $this->profile->id);
......@@ -72,7 +71,6 @@ class DeleteuserAction extends ProfileFormAction
if (empty($this->user)) {
// TRANS: Client error displayed when trying to delete a non-local user.
$this->clientError(_('You can only delete local users.'));
return false;
}
return true;
......