Updating user email address.

This commit is contained in:
David Jay
2017-01-09 18:15:25 -05:00
parent 9809403701
commit a2704e3099
4 changed files with 7 additions and 4 deletions
@@ -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}>
+4 -2
View File
@@ -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) => {