Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

📬 fix: Email Verification Handling in Create-User Command (#11408)

Shahryar Tayeb639a60cf19f7
diff --git a/config/create-user.js b/config/create-user.js
index 30cd6669ee..3688d736e2 100644
--- a/config/create-user.js
+++ b/config/create-user.js
@@ -14,7 +14,7 @@ const connect = require('./connect');
console.purple('--------------------------');
if (process.argv.length < 5) {
- console.orange('Usage: npm run create-user <email> <name> <username> [--email-verified=false]');
+ console.orange('Usage: npm run create-user -- <email> <name> <username> [--email-verified=false]');
console.orange('Note: if you do not pass in the arguments, you will be prompted for them.');
console.orange(
'If you really need to pass in the password, you can do so as the 4th argument (not recommended for security).',
@@ -88,7 +88,11 @@ If \`n\`, and email service is configured, the user will be sent a verification
If \`n\`, and email service is not configured, you must have the \`ALLOW_UNVERIFIED_EMAIL_LOGIN\` .env variable set to true,
or the user will need to attempt logging in to have a verification link sent to them.`);
- if (emailVerifiedInput.toLowerCase() === 'n') {
+ const normalizedEmailVerifiedInput = emailVerifiedInput.trim().toLowerCase()
+
+ emailVerified = true
+
+ if (normalizedEmailVerifiedInput === 'n') {
emailVerified = false;
}
}