Skip to content

Commit 4fc6a2f

Browse files
Merge pull request #4003 from OneCommunityGlobal/venkataramanan_fix_user_management_duplicate_first_and_last_name_issue
Venkataramanan fix: Add user with same first and last name
2 parents a715a63 + 5d2e302 commit 4fc6a2f

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ class UserProfileAdd extends Component {
636636
block
637637
size="lg"
638638
data-testid="create-userProfile"
639-
onClick={() => this.createUserProfile(false)}
639+
onClick={() => this.createUserProfile(true)}
640640
style={darkMode ? boxStyleDark : boxStyle}
641641
>
642642
Create
@@ -770,7 +770,7 @@ class UserProfileAdd extends Component {
770770
else return false;
771771
};
772772

773-
createUserProfile = allowsDuplicateName => {
773+
createUserProfile = () => {
774774
let that = this;
775775
const {
776776
firstName,
@@ -812,7 +812,7 @@ class UserProfileAdd extends Component {
812812
collaborationPreference: collaborationPreference,
813813
timeZone: timeZone,
814814
location: location,
815-
allowsDuplicateName: allowsDuplicateName,
815+
allowsDuplicateName: true,
816816
createdDate: createdDate,
817817
teamCode: this.state.teamCode,
818818
actualEmail: role === 'Administrator' || role === 'Owner' ? actualEmail : '',
@@ -872,14 +872,6 @@ class UserProfileAdd extends Component {
872872
.then(res => {
873873
if (res.data.warning) {
874874
toast.warn(res.data.warning);
875-
} else if (
876-
this.checkIfDuplicate(userData.firstName, userData.lastName) &&
877-
!allowsDuplicateName
878-
) {
879-
this.setState({
880-
popupOpen: true,
881-
});
882-
return;
883875
} else {
884876
toast.success('User profile created.');
885877
this.state.userProfile._id = res.data._id;

0 commit comments

Comments
 (0)