Task #134
openPublic Enterprise Registration and Login
0%
Description
This module allows a public user (trip company or business person) to register through the frontend by providing basic details such as name, email, and phone number. Once registered, the system creates a new enterprise record and automatically generates login credentials (username and password). These credentials are sent to the registered email or phone number. The user can then log in using the provided credentials to access the system and manage their services.
This process ensures that each public user becomes a registered enterprise in the system with secure login access.
Table
enterprise_master(existing table)
- enterprise_id Unique ID (auto generated)
- enterprise_name Name of company/person
- email Login email
- phone Contact number
- username Login username
- password Encrypted password
- is_active Active / inactive
- created_at Registration date
Validations
Mandatory Fields
- enterprise_name required
- email required
- phone required
- Must be valid email format
- Must be unique in enterprise_master
- Prevent dupliation
same email cannot register twice
Phone
- Must be numeric
- Must be 10–15 digits
- Must be unique
Prevent duplicate phone registration
Username generation
- System must generate unique username automatically
OR - If entered manually, must be unique
Prevent duplicate username
Password
- System must generate password automatically
- Must store encrypted password
- Must not store plain password
Credential Sending
-
After registration:
-
System must send username and password to registered email
OR -
Send via SMS to phone number
Login
- username required
- password required
- Username must exist in enterprise_master
- Password must match
- is_active must be TRUE
Prevent login if:
- Wrong username
- Wrong Password
- is_active=False