duplicate contacts catch and handle and welsh
This commit is contained in:
@@ -191,6 +191,25 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
await getPortalLogin(thisSession.user.email),
|
||||
]);
|
||||
|
||||
//grabs first contact on this list
|
||||
|
||||
//jump out page for duplicates....
|
||||
|
||||
console.log(
|
||||
"Number of contacts with this email:",
|
||||
loggedInUser.value.length
|
||||
);
|
||||
if (loggedInUser.value.length > 1) {
|
||||
return {
|
||||
redirect: {
|
||||
destination:
|
||||
ctx.locale == "cy"
|
||||
? "/cy/manylionpellach"
|
||||
: "/furtherdetails",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
loggedInUser = loggedInUser.value[0].contactid;
|
||||
//console.log("nextAuth Session:", thisSession);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user