Commit 827a2ce9 authored by Vitalie Ciubotaru's avatar Vitalie Ciubotaru Committed by Jonne Haß

Remove links to deleted profiles in admin user stats

closes #8063
closes #8061
parent ba8e0907
......@@ -3,6 +3,7 @@
## Refactor
## Bug fixes
* Don't link to deleted users in admin user stats [#8063](https://github.com/diaspora/diaspora/pull/8063)
## Features
......
......@@ -43,7 +43,7 @@ class AdminsController < Admin::AdminController
@created_users = User.where("username IS NOT NULL and created_at IS NOT NULL")
@created_users.find_each do |u|
week = u.created_at.beginning_of_week.strftime("%Y-%m-%d")
@created_users_by_week[week] << u.username
@created_users_by_week[week] << {username: u.username, closed_account: u.person.closed_account}
end
@selected_week = params[:week] || @created_users_by_week.keys.last
......
......@@ -18,4 +18,8 @@
= t(".amount_of", count: counter)
%br
- created_users_by_week[selected_week].each do |m|
= link_to m, "/u/#{m}"
- if m[:closed_account]
%s
= m[:username]
- else
= link_to m[:username], "/u/#{m[:username]}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment