mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
Updating user email address.
This commit is contained in:
@@ -18,8 +18,9 @@ const UserAction = props => {
|
||||
let userStatus = user.status;
|
||||
const links = user.settings.bio ? linkify.getMatches(user.settings.bio) : [];
|
||||
|
||||
//Do not display if the user status is 'active'. This means that they have already been reviewed and approved.
|
||||
return userStatus !== 'active' &&
|
||||
// Do not display unless the user status is 'pending' or 'banned'.
|
||||
// This means that they have already been reviewed and approved.
|
||||
return (userStatus === 'pending' || userStatus === 'banned') &&
|
||||
<li tabIndex={props.index} className={`${styles.listItem} ${props.isActive && !props.hideActive ? styles.activeItem : ''}`}>
|
||||
<div className={styles.itemHeader}>
|
||||
<div className={styles.author}>
|
||||
|
||||
@@ -63,13 +63,15 @@ router.post('/:user_id/email', authorization.needed('admin'), (req, res, next) =
|
||||
body: req.body.body
|
||||
},
|
||||
subject: req.body.subject,
|
||||
to: user.email
|
||||
to: user.profiles[0].id // This only works if the user has registered via e-mail.
|
||||
// We may want a standard way to access a user's e-mail address in the future
|
||||
};
|
||||
return mailer.sendSimple(options);
|
||||
})
|
||||
.then(() => {
|
||||
res.status(204).end();
|
||||
});
|
||||
})
|
||||
.catch(next);
|
||||
});
|
||||
|
||||
router.post('/', (req, res, next) => {
|
||||
|
||||
Reference in New Issue
Block a user