[vhffs-dev] [2275] only display validated users in public panel part |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 2275
Author: gradator
Date: 2015-02-23 09:02:50 +0100 (Mon, 23 Feb 2015)
Log Message:
-----------
only display validated users in public panel part
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/User.pm
Modified: trunk/vhffs-api/src/Vhffs/Panel/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/User.pm 2015-02-23 07:20:06 UTC (rev 2274)
+++ trunk/vhffs-api/src/Vhffs/Panel/User.pm 2015-02-23 08:02:50 UTC (rev 2275)
@@ -64,8 +64,8 @@
=head2 get_last_users
Fetches and returns an array of hashrefs {username, firstname, lastname,
-groups => {groupname}} containing information about the last ten users of the
-platform
+groups => {groupname}} containing information about the last 10 active and
+validated users of the platform
=cut
@@ -75,7 +75,7 @@
my $sql = 'SELECT u.uid, u.username, u.firstname, u.lastname '.
'FROM vhffs_users u '.
'INNER JOIN vhffs_object o ON o.object_id=u.object_id '.
- 'WHERE o.state=? ORDER BY o.date_creation DESC LIMIT 10';
+ 'WHERE o.state=? AND u.validated=true ORDER BY o.date_creation DESC LIMIT 10';
my $dbh = $vhffs->get_db();
@@ -111,7 +111,7 @@
$users = Vhffs::Panel::User::public_search($vhffs, $username, $start);
-Returns all users whose username contains C<$username>.
+Returns all active and validated users whose username contains C<$username>.
=cut
@@ -123,7 +123,7 @@
my $sql =
'FROM vhffs_users u '.
'INNER JOIN vhffs_object o ON o.object_id = u.object_id '.
- 'WHERE o.state = ? ';
+ 'WHERE o.state = ? AND u.validated=true ';
my @params;
push @params, Vhffs::Constants::ACTIVATED;