mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-14 17:58:02 -05:00
update for active users
This commit is contained in:
@@ -35,7 +35,7 @@ exports.listActiveUsers = async function (req,res,next) {
|
|||||||
|
|
||||||
if (!users.hasOwnProperty(system.userId.toString())) {
|
if (!users.hasOwnProperty(system.userId.toString())) {
|
||||||
const user = await User.findById(system.userId, "_id email firstName lastName lastLogin");
|
const user = await User.findById(system.userId, "_id email firstName lastName lastLogin");
|
||||||
users[system.userId.toString()] = user.email;
|
users[system.userId.toString()] = { email: user.email, firstName: user.firstName, lastName: user.lastName };
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,10 +22,20 @@ const ActiveUsers = () => {
|
|||||||
<Header as="h1">Email of Active Users</Header>
|
<Header as="h1">Email of Active Users</Header>
|
||||||
|
|
||||||
|
|
||||||
|
<Header as="h3">List</Header>
|
||||||
{users &&
|
{users &&
|
||||||
users.map((user) =>
|
users.map((user) =>
|
||||||
|
|
||||||
<span>{user}, </span>
|
<span>{user.firstName} {user.lastName} <{user.email}>, </span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<Header as="h3">CSV</Header>
|
||||||
|
|
||||||
|
First Name, Last Name, Email
|
||||||
|
{users &&
|
||||||
|
users.map((user) =>
|
||||||
|
<span>{user.firstName}, {user.lastName}, {user.email} <br/></span>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
Reference in New Issue
Block a user