1 | <?php |
||
2 | |||
3 | use Ffcms\Core\Helper\Date; |
||
4 | use Ffcms\Templex\Url\Url; |
||
5 | |||
6 | /** @var Apps\Model\Admin\User\FormUserDelete $model */ |
||
7 | /** @var Ffcms\Templex\Template\Template $this */ |
||
8 | |||
9 | $this->layout('_layouts/default', [ |
||
10 | 'title' => __('Delete users'), |
||
11 | 'breadcrumbs' => [ |
||
12 | Url::to('main/index') => __('Main'), |
||
13 | Url::to('application/index') => __('Applications'), |
||
14 | Url::to('user/index') => __('User list'), |
||
15 | __('Delete users') |
||
16 | ] |
||
17 | ]); |
||
18 | |||
19 | ?> |
||
20 | <?php $this->start('body') ?> |
||
21 | <?= $this->insert('user/_tabs') ?> |
||
0 ignored issues
–
show
|
|||
22 | |||
23 | <h1><?= __('Delete users') ?></h1> |
||
24 | <p><?= __('Are you sure to delete this users?') ?></p> |
||
25 | <?php |
||
26 | $table = $this->table(['class' => 'table']) |
||
27 | ->head([ |
||
28 | ['text' => '#'], |
||
29 | ['text' => __('Email')], |
||
30 | ['text' => __('Login')], |
||
31 | ['text' => __('Nickname')], |
||
32 | ['text' => __('Register date')] |
||
33 | ]); |
||
34 | |||
35 | foreach ($model->users as $user) { |
||
36 | /** @var \Apps\ActiveRecord\User $user */ |
||
37 | $nickname = \Ffcms\Core\Helper\Simplify::parseUserNick($user->id); |
||
38 | $table->row([ |
||
39 | ['text' => $user->getParam('id')], |
||
40 | ['text' => $user->getParam('email')], |
||
41 | ['text' => $user->getParam('login')], |
||
42 | ['text' => $nickname], |
||
43 | ['text' => Date::convertToDatetime($user->created_at, Date::FORMAT_TO_HOUR)] |
||
44 | ]); |
||
45 | } |
||
46 | ?> |
||
47 | |||
48 | <div class="table-responsive"> |
||
49 | <?= $table->display() ?> |
||
50 | </div> |
||
51 | |||
52 | <?php $form = $this->form($model); ?> |
||
53 | <?= $form->start() ?> |
||
54 | |||
55 | <div class="row mb-2 mt-2"> |
||
56 | <div class="col-12"> |
||
57 | <?= $form->field()->boolean('delete', ['id' => 'delete_user_data']) ?> |
||
58 | <label for="delete_user_data"><?= __('Delete all user data (comments, content, wall posts, feedback)?') ?></label> |
||
59 | </div> |
||
60 | </div> |
||
61 | |||
62 | <?= $form->button()->submit(__('Delete'), ['class' => 'btn btn-danger']) ?> |
||
63 | <?= $form->button()->cancel(__('Cancel'), ['link' => ['user/index'], 'class' => 'btn btn-secondary']) ?> |
||
64 | <?= $form->stop() ?> |
||
65 | |||
66 | <?php $this->stop() ?> |
||
67 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.