Hi! One question please: what would be the best im...
# support-questions-legacy
d
Hi! One question please: what would be the best implementation for a user with "teacher" role, that wants to create emailpassword users with the role "student" in a customize signup page?
r
hey @drixhua
you mean the teacher would manually add a student by entering their email and password? Or just entering their email and then the student would get an invite link and set their password?
d
Ideally the teacher would manually add a student by entering their email and a made up password
but the invite link seems like a good option aswell
but I want other teacher to sign up as usual from the pre built ui
r
yea, so you could still have the sign up UI showing, and then override the sign up API to only allow teachers. I guess you can identify if it's a teacher who is trying to sign up based on the email ID?
d
basically what I want is a form inside my app, so that whenever a teacher is logged in, he can add (signup) a student giving in the students email and a new password, and that will create a ST user for that student, but the teacher will still be logged in with his session. Maybe an invitation link will be sent to the student to log in?
r
yup! so you can make your own API on the backend which calls the emailpassword.signup function for the student account
the signup function doesn't create a new session
d
great, thanks!
Is there a way I can deactivate email verification for newly created students? And just send them the resetpassowrd link (by the way the reset password link is appearing on spam folder)
r
you can mark their emails as verified manually right after you call the signUp function: https://supertokens.com/docs/emailpassword/common-customizations/email-verification/changing-email-verification-status
You should use your own SMTP config to send emails. Or some other way: https://supertokens.com/docs/emailpassword/email-delivery/about