Advertisement:
Anonymous Login
12-05-2016 07:49 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004388SMF 2.1[SMF 3.0 "Saguaro"] public2012-08-14 11:31
ReporterNorv 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
Summary0004388: Sort members awaiting deletion by last login
DescriptionAs the title says.
It makes no sense to sort them by registration date ... It should be replaced by last login date, THAT is helpful for the admin to decide which to approve.

Admin > Members > Awaiting approval.

(at most, both, though I don't see the real use of registration date anyway).
Additional InformationPointed out by Sleepy, from sm.org problems.
Tags2.1
Attached Files

-Relationships
+Relationships

-Notes

bugnote:0012635

Nao/Gilles (Viewer)

Why Saguaro?

bugnote:0014447

groundup (SMF Friend)

This one is confusing me. In Subs-Members.php find
'default_sort_col' => 'date_registered',

replace with
'default_sort_col' => $context['current_filter'] == 4 ? 'mem.last_login' : 'date_registered',

Not sure if that will work at all, but it seems close.

bugnote:0014456

emanuele (Viewer)

That's a good start because I didn't know about current_filter.

What I did is to use the same column and use it to show alternatively the registration date or the last log in date. Show the two columns is not possible (since the function is shared with approval and in case of approval would be useless).
Basically this is the code I used:
[code]
            'date_registered' => array(
                'header' => array(
                    'value' => $context['current_filter'] == 4 ? $txt['viewmembers_online'] : $txt['date_registered'],
                ),
                'data' => array(
                    'function' => create_function('$rowData', '
                        return timeformat($rowData[\'' . ($context['current_filter'] == 4 ? 'last_login' : 'date_registered') . '\']);
                    '),
                ),
                'sort' => array(
                    'default' => $context['current_filter'] == 4 ? 'mem.last_login DESC' : 'date_registered DESC',
                    'reverse' => $context['current_filter'] == 4 ? 'mem.last_login' : 'date_registered',
                ),
            ),
[/code]

bugnote:0014472

emanuele (Viewer)

Last edited: 2012-03-03 10:05

View 2 revisions

Commit: 147feb295d0224087d465071cf3cae624ad76431
Message: ! Members awaiting approval are sorted by last login date instead of registration date [Bug 4388]
Author: emanuele
Date: 01/03/2012

bugnote:0014482

groundup (SMF Friend)

Sounds good. Going to close it?
+Notes
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group