Code Style

This commit is contained in:
Daniel Kesselberg 2018-01-18 13:10:33 +01:00
parent 59c1fc609b
commit 2ba1b7647e
2 changed files with 10 additions and 4 deletions

View File

@ -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) {

View File

@ -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.');
}
}
}