Made it so users have to verify their e-mail starting to use the application
This commit is contained in:
@@ -35,7 +35,7 @@ import AbandonPopup from "@/components/AbandonPopup";
|
||||
export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
||||
const user = req.session.user;
|
||||
|
||||
if (!user) {
|
||||
if (!user || !user.isVerified) {
|
||||
res.setHeader("location", "/login");
|
||||
res.statusCode = 302;
|
||||
res.end();
|
||||
|
||||
Reference in New Issue
Block a user