0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Removed email update directly using member session auth

refs https://github.com/TryGhost/members.js/issues/30

- Member cannot update their email directly but need to do it via magic link sent to new email address
- Previous profile update change had allowed email to be updated directly as well for authenticated member
This commit is contained in:
Rish 2020-05-28 19:31:00 +05:30
parent 6871b96d7d
commit 3471a21bc3

View file

@ -68,7 +68,7 @@ const getMemberData = async function (req, res) {
const updateMemberData = async function (req, res) {
try {
const data = _.pick(req.body, 'email', 'name', 'subscribed');
const data = _.pick(req.body, 'name', 'subscribed');
const member = await membersService.ssr.getMemberDataFromSession(req, res);
if (member) {
const updatedMember = await membersService.api.members.update(data, {id: member.id});