mirror of
https://github.com/humhub/humhub.git
synced 2025-02-24 03:06:04 +01:00
Code Style
This commit is contained in:
parent
59c1fc609b
commit
2ba1b7647e
@ -214,6 +214,7 @@ class UserController extends Controller
|
||||
|
||||
/**
|
||||
* Deletes a user permanently
|
||||
* @throws HttpException
|
||||
*/
|
||||
public function actionDelete()
|
||||
{
|
||||
@ -223,10 +224,15 @@ class UserController extends Controller
|
||||
$user = User::findOne(['id' => $id]);
|
||||
|
||||
if ($user == null) {
|
||||
throw new HttpException(404, Yii::t('AdminModule.controllers_UserController', 'User not found!'));
|
||||
throw new HttpException(
|
||||
404,
|
||||
Yii::t('AdminModule.controllers_UserController', 'User not found!')
|
||||
);
|
||||
} elseif (Yii::$app->user->id == $id) {
|
||||
throw new HttpException(400,
|
||||
Yii::t('AdminModule.controllers_UserController', 'You cannot delete yourself!'));
|
||||
throw new HttpException(
|
||||
400,
|
||||
Yii::t('AdminModule.controllers_UserController', 'You cannot delete yourself!')
|
||||
);
|
||||
}
|
||||
|
||||
if ($doit == 2) {
|
||||
|
@ -84,4 +84,4 @@ class SpreadsheetExportTest extends Unit
|
||||
$this->assertContains('"1","first"', $data, 'Data not present in content.');
|
||||
$this->assertContains('"2","second"', $data, 'Data not present in content.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user