Auto User Creation after Student Applicant

Hi , is there a way for when a student applicant applies via a web form (no login required setting), a corresponding user will be created for the student and that student applicant entry will be tied to that user?

At the same time, these credentials will be sent to the user via e-mail. Any suggestion?

By default, a new User is created for every new Student

Thanks for your reply! I was referring to a student applicant, not yet Student. So at this point, the student has not yet been admited or no student doctype has been created, he is still just an applicant at the stage. Is it possible?

So you want a user to be created before the student is approved for admission ?
What if the student is not approved ?

Yes correct. The user can be retained as it is used by the student to manage his future applications. The purpose of having created a user at the start is for the student to view and manage his submission for applicatoin

you need to customize then according to your use case

I am trying to do the same. I can’t find an example to create an user with server script
I’ve tried this
NewUser = frappe.get_doc({
‘doctype’: ‘User’,
‘email’: doc.email_id,
‘First Name’: doc.applicant_first_name,
‘Last Name’: doc.applicant_last_name,
It doesn’t work I get an error Error: Value missing for User: First Name
Can anybody help?

I solved with this :slight_smile:
doc was the the document where I was pulling data from
doctype = ‘User’,
email = doc.email_id,
name = doc.email_id,
last_name =doc.last_name,
first_name = doc.first_name
frappe.msgprint("A user was created with email "+ doc.email_id);