diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6a248e698a..e7083933a6 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -5,7 +5,7 @@ class UsersController < ApplicationController user = User.where(invitation_token: params[:token]).first if user - user.update(password: params[:password], invitation_token: nil) + user.update(first_name: params[:first_name], last_name: params[:last_name], password: params[:password], invitation_token: nil) user.organization_users.first.update(status: 'active') if params[:new_signup] diff --git a/frontend/src/InvitationPage/InvitationPage.jsx b/frontend/src/InvitationPage/InvitationPage.jsx index dccf6672d8..7139089c67 100644 --- a/frontend/src/InvitationPage/InvitationPage.jsx +++ b/frontend/src/InvitationPage/InvitationPage.jsx @@ -22,12 +22,12 @@ class InvitationPage extends React.Component { e.preventDefault(); const token = this.props.match.params.token; - const { password, organization, newSignup } = this.state; + const { password, organization, newSignup, firstName, lastName } = this.state; this.setState({ isLoading: true }); userService - .setPasswordFromToken({ token, password, organization, newSignup }) + .setPasswordFromToken({ token, password, organization, newSignup, firstName, lastName }) .then(() => { this.setState({ isLoading: false }); toast.success('Password has been set successfully.', { hideProgressBar: true, position: 'top-center' }); @@ -47,27 +47,54 @@ class InvitationPage extends React.Component {