I’m trying to create a new user, but I’m encountering a 500 error. It was working fine before, but now it consistently fails. After deleting a few users and creating a new one, it briefly worked, but now I can’t create any new users at all and keep facing the 500 error. The VM where Tutor is deployed is currently using 58% of its memory.
Hi @Hamza! Welcome to the forum!
How do you create users? Note that you should not try to create users via the Django admin panel. Please check the LMS logs (tutor local logs lms --follow
) while you create users, it might give details of the error.
Thanks for the welcome! <3
Yes, I am creating users from the django admin portal.
The error log says
django.db.utils.IntegrityError: (1062, “Duplicate entry ‘’ for key ‘auth_user.email’”)
What is the other method if not from the django admin portal.
There are a couple of options.
- The best way is always to have the user register themselves. This way you ensure that their password meets the security requirements and their account is private and secure.
- A variation of the autoregistration is to enroll them in a course from the instructor panel. This way, you control the emails of the invited users. They will receive an email with indications to complete the registration process. I think this is the best way for a large number of users.
- You can also do the bulk enrollment using the
/api/bulk_enroll/v1/bulk_enroll/
API. - If you still need to create users manually you can use the
tutor {local|k8s} do create user
command. This is good if you have to register one or a few users. - For more advanced users, you can use the
manage.py lms manage_user
command from within the container’s shell or via Tutor, liketutor local exec lms ./manage.py lms manage_user
.
Thanks a lot for the response brother.
I will try the mentioned methods.
Hi @Hamza!
When creating a user through the admin interface, the user is initially created with an empty email field. You likely encountered the issue because there’s already a user with an empty email, which is why the system isn’t allowing you to create another one.
We recommend creating users through the proper module (registration page) or by using the user creation command from the terminal. To resolve the current issue, you can search for the user with the empty email and assign a fake email address to that user. This will allow you to create a new user and assign the correct email.
I hope it can be useful.
@CatalinaMoralesor
I had a few theories about why I was encountering this error, and I suspected duplicate emails might be the cause. However, I never considered that an empty email could also be duplicated. Thanks so much for your help—I really appreciate it!
@Andres.Aulasneo
Thanks for the options you mentioned. Since we want to disable the registration process, we’ll need to create users manually, and for that, tutor local do createuser
works well.
Additionally, if you could guide me on how to disable the register button and the registration process, it would be greatly appreciated.
Thanks again!
Great. To disable the registration process you have to set the ALLOW_PUBLIC_ACCOUNT_CREATION
feature flag to False
. You can use the common-env-features
Tutor patch for that.
Thanks @Andres.Aulasneo
The feature flag worked. Grateful for your guidance.
I have one more question,
I want to remove the footer links on the login page
I can see three different feature flags related to footer links
- ENABLE_FOOTER_MOBILE_APP_LINKS
- SHOW_FOOTER_LANGUAGE_SELECTOR
- ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER
My research says that none these can help me with my problem. Please guide me on this.
In this issue ‘how-to-customize-header-and-footer-in-tutor-mfe’ I can see that it is possible to update it and not remove it.
Grateful for your help so far!
Thanks in Advance
Which version are you running? Since Palm, the login page is a MFE and it doesn’t have any footer or header.
The tutor version is
tutor --version
tutor, version 18.1.1
I don’t know the name, though I can see an mfe 18.0.0 plugin enabled in
tutor plugins list
mfe ✅ enabled 18.0.0
Images of footer on login page attached for reference
Mmm… this is not the login page. Which is the complete URL of this page?
Loging page url: | DP Learning (data-pilot.com)
I am using Indigo theme. Also, can you suggest to me some other themes (free or paid) thatI can use or where can I find them.
Thanks in advance.
Hi Hamza,
The footer links you’re referring to in the image are located on the main page of the LMS. The login page URL in your case is https://apps.edx.data-pilot.com/authn/login?next=%2F
. You can remove the links by running the following command:
tutor config save --set "INDIGO_FOOTER_NAV_LINKS=[]"
For more details, you can refer to indigo documentation.
Hi @Hamza,
Check our Branding Tutor plugin. It has many features that can be helpful.
Thanks, alot @hinakhadim
I can see in the readme that you are the owner of indigo. This is great. I am grateful for your response to my question.
Unfortunately, this command (tutor config save --set “INDIGO_FOOTER_NAV_LINKS=”) did not work for me. I also updated the welcome message by using
tutor config save --set INDIGO_WELCOME_MESSAGE="Updated Welcome Message"
tutor local restart
The expected results were not seen on the Data Pilot edx main page. The expected results are the removal of all links and the link text as well.
Also, When I do
tutor config printvalue INDIGO_WELCOME_MESSAGE
the updated value is printed on the terminal which is “Updated Welcome Message”
Thanks in advance for your kind help!
No worries. You have updated the configuration and need to rebuild the openedx
image. Run:
tutor local stop
tutor images build openedx
tutor local start -d
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.