Skip to content

Commit

Permalink
Merge pull request #197 from praveenKDass/release-5.1.0
Browse files Browse the repository at this point in the history
bug fixes:certificate lastName issue
  • Loading branch information
aks30 authored Sep 13, 2024
2 parents db3cea4 + fb69c7e commit 4f9d913
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions module/userProjects/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2533,12 +2533,17 @@ module.exports = class UserProjectsHelper {
}
certificateTemplateDetails[0].issuer.kid = CERTIFICATE_ISSUER_KID;
}

let certificateUserName;
if (data.userProfile.lastName && data.userProfile.lastName.length > 0) {
certificateUserName = `${data.userProfile.firstName} ${data.userProfile.lastName}`;
} else {
certificateUserName = `${data.userProfile.firstName}`;
}
//create certificate request body
let certificateData = {
recipient : {
id : data.userId,
name : `${data.userProfile.firstName} ${data.userProfile.lastName}`,
name : certificateUserName,
type : data.userProfile.profileUserType.type
},
templateUrl : data.certificate.templateUrl,
Expand Down

0 comments on commit 4f9d913

Please sign in to comment.