Can't login into OpenCart installed 1 year ago ((
System informs 'Email not found', but email is located into db.
Run this in phpmyadmin to reset your password.
UPDATE `opencart`.`oc_user` SET `password` = MD5('123456') WHERE `oc_user`.`user_id` = 'YOUR_USER_ID';
Related
I am building an application for admins and users in Flask to request/approve requests.
When a user raises a request, the next time the admin logs into the system. I would like the notification bell in my Flask app to reflect the number of new requests.
I understand the HTML, CSS, JS changes and have been using Python for 2+ years.
I just want someone to point me in the right direction of how this can be done and what library.
My database is on AWS using Relational Database Service (RDS). I have built the login system, and users can raise requests which adds data to the database. I am just stuck now on how to let the Admin know when logged in.
Your help would be greatly appreciated! I could not see any questions similar to this
I am using MYSQLClient, and I have added my code below of how I display all requests in the terminal, I have other code to display this in Flask App. I would like to just know about newly added requests in the notification dropdown that appears when bell selected.
hostname = 'localhost'
username = 'username'
password = 'password'
database = 'dbname'
def doQuery( conn ) :
cur = conn.cursor()
cur.execute( "SELECT fname, lname FROM employee" )
for firstname, lastname in cur.fetchall() :
print( firstname, lastname )
I'm trying to log on WSO2-IS new console and myaccount as user admin and I'm getting an error:
http://localhost:9443/console/login
http://localhost:9443/myaccount/login
Invalid username! Username should be an E-Mail address.
I've already check user permission on carbon console as admin and it seems OK:
I added the tenant to enable email as domain but I forgot to put the user admin to use email address as the username:
[tenant_mgt]
enable_email_domain= true
[super_admin]
username = "admin#wso2.com"
password = "admin"
I also added this user to the roles "Application/Console" and "Application/My Account".
I have my linkedin scope set as follows:
SOCIAL_AUTH_LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress']
When I try logging in using python social auth then an exception is raised which is defined in my model:
if not email:
raise ValueError('Users must have an email address')
while logging in with facebook and google work fine but not linkedin
The error means it does not have email field in it. I am working on my localhost
It looks like for linkedin we need to specify field selectors in order to get email address and other information from it unlike facebook and google. This is what i was missing:
SOCIAL_AUTH_LINKEDIN_FIELD_SELECTORS = ['email-address']
I've just created a new django app but am unable to log into the (grappelli) admin with a valid superuser. I've checked the user in the shell -
>>> from django.contrib.auth import authenticate
>>> user = authenticate(username='admin', password='admin')
>>> user.is_active and user.is_superuser
True
When I enter the same credentials at localhost:8000/admin I get an error message saying 'Please correct the errors below'. However no errors are listed
I noticed that there's no session being created in the django_sessions table when I try and login using the browser (there are sessions created for the shell login above).
I'm using django 1.6.2 with grappelli and running this on django's dev webserver.
If you want to login into django admin you should checked below options.
is_superuser is True
or
is_staff is True
for the user you are login .
EDIT
try to uninstall grappelli and then login into django admin.
My problem was solved by setting a breakpoint where the login actually happens. Which is here: https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L371
The self.has_permission(request) returned a False, even though in the database is_staff was set to 1. Clearing the cache fixed it for me.
In my custom authentication backend I extract the username, email, first and last name from an LDAP response and try to stick them into a newly generated User object if the user doesn't yet exist:
user = User(username=username, email=result[0][1].get('mail')[0], first_name=result[0][1].get('givenName')[0], last_name=result[0][1].get('sn')[0])
user.save()
And another variant I tried:
user = User.objects.create_user(username, result[0][1].get('mail')[0])
user.first_name = result[0][1].get('givenName')[0]
user.last_name = result[0][1].get('sn')[0]
user.save()
While the username and email show up in the admin after the user's initial successful authentication attempt I can't get the first and last name to display. Logging the values from the LDAP response shows that these exist.
Any idea what's going wrong here?
Ok, it was indeed my own stupidity: should not only have restarted the frontend webserver but also uWSGI! I could add to my defense that these are my baby steps with uWSGI...