Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Admin area reports on less user details.
James Colea3f1b72bac0b
diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.phpindex cab96f62a2..0770e01ff3 100644--- a/app/Http/Controllers/Admin/UserController.php+++ b/app/Http/Controllers/Admin/UserController.php@@ -83,28 +83,18 @@ class UserController extends Controller{$subTitle = strval(trans('firefly.user_administration'));$subTitleIcon = 'fa-users';- $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data;$users = $repository->all();// add meta stuff.$users->each(- function (User $user) use ($mustConfirmAccount) {- $list = ['user_confirmed', 'twoFactorAuthEnabled', 'twoFactorAuthSecret', 'registration_ip_address', 'confirmation_ip_address'];- $preferences = Preferences::getArrayForUser($user, $list);-- $user->activated = true;- if (!($preferences['user_confirmed'] === true) && $mustConfirmAccount === true) {- $user->activated = false;- }-+ function (User $user) {+ $list = ['twoFactorAuthEnabled', 'twoFactorAuthSecret'];+ $preferences = Preferences::getArrayForUser($user, $list);$user->isAdmin = $user->hasRole('owner');$is2faEnabled = $preferences['twoFactorAuthEnabled'] === true;$has2faSecret = !is_null($preferences['twoFactorAuthSecret']);- $user->has2FA = false;- if ($is2faEnabled && $has2faSecret) {- $user->has2FA = true;- }- $user->prefs = $preferences;+ $user->has2FA = ($is2faEnabled && $has2faSecret) ? true : false;+ $user->prefs = $preferences;});diff --git a/resources/views/admin/users/index.twig b/resources/views/admin/users/index.twigindex af0a04df9f..dacf2a65bf 100644--- a/resources/views/admin/users/index.twig+++ b/resources/views/admin/users/index.twig@@ -17,11 +17,8 @@<th data-defaultsign="_19" class="hidden-xs" colspan="2"> </th><th data-defaultsign="az">{{ trans('list.email') }}</th><th data-defaultsign="month" class="hidden-xs">{{ trans('list.registered_at') }}</th>- <th data-defaultsign="az" class="hidden-xs">{{ trans('list.registered_from') }}</th>- <th data-defaultsign="az" class="hidden-xs">{{ trans('list.confirmed_from') }}</th><th class="hidden-xs">{{ trans('list.is_admin') }}</th><th class="hidden-xs">{{ trans('list.has_two_factor') }}</th>- <th>{{ trans('list.is_activated') }}</th><th>{{ trans('list.is_blocked') }}</th><th data-defaultsign="az" class="hidden-xs">{{ trans('list.blocked_code') }}</th></tr>@@ -41,18 +38,6 @@{{ user.created_at.formatLocalized(monthAndDayFormat) }}{{ user.created_at.format('H:i') }}</td>- <td data-value="{{ user.prefs.registration_ip_address }}" class="hidden-xs">- {{ user.prefs.registration_ip_address }}- {% if user.prefs.registration_ip_address|length > 0 %}- (<a href="http://whois.domaintools.com/{{ user.prefs.registration_ip_address }}">whois</a>)- {% endif %}- </td>- <td data-value="{{ user.prefs.confirmation_ip_address }}" class="hidden-xs">- {{ user.prefs.confirmation_ip_address }}- {% if user.prefs.confirmation_ip_address|length > 0 %}- (<a href="http://whois.domaintools.com/{{ user.prefs.confirmation_ip_address }}">whois</a>)- {% endif %}- </td><td class="hidden-xs" data-value="{% if user.isAdmin %}1{% else %}0{% endif %}">{% if user.isAdmin %}<small class="text-success"><i class="fa fa-fw fa-check"></i></small>@@ -67,13 +52,6 @@<small class="text-danger"><i class="fa fa-fw fa-times"></i></small>{% endif %}</td>- <td data-value="{% if user.activated %}1{% else %}0{% endif %}">- {% if user.activated %}- <small class="text-success"><i class="fa fa-fw fa-check"></i></small>- {% else %}- <small class="text-danger"><i class="fa fa-fw fa-times"></i></small>- {% endif %}- </td><td data-value="{% if user.blocked %}1{% else %}0{% endif %}">{% if user.blocked == 1 %}<small class="text-danger"><i class="fa fa-fw fa-check" title="{{ 'yes'|_ }}"></i></small>