this post was submitted on 03 Jun 2023
1 points (100.0% liked)

Lemmy Support

4660 readers
19 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I’ve hit an issue with Lemmy. Initial startup was fine… I created my admin user and logged in. Then I created this account.

Third account I went to test with failed to login… then my other accounts also failed, so I rebooted.

Now when I try to log into my admin account, it just spins forever. Checking logs, I see this:

lemmy_server::api_routes_websocket: email_not_verified: email_not_verified

Can anyone tell me how I can manually flag my admin account as having been email verified already?

top 7 comments
sorted by: hot top controversial new old
[–] adminac@philly.page 0 points 2 years ago (1 children)

I was having the same issue. flipped "Email_verified" from 'f' to 't' in the "local_users" table and I'm able to log in with my admin account now. not sure what else may have been messed up in the process though.

[–] Lodion@lemmy.click 0 points 2 years ago (1 children)

Thats what I figured... I just have no idea how to do it. Can you point me to any info on how to do that? :)

[–] Lodion@lemmy.click 1 points 2 years ago* (last edited 2 years ago) (1 children)

Ok, figured it out myself. For anyone else that needs it..

Run a shell within the postgres docker container:

docker exec -it _postgres_1 sh

Connect to the postgres service:

psql -U lemmy -h 127.0.0.1 -p 5432 -d lemmy

Connect to the lemmy database:

\c lemmy

Then the user table: \d local_user

Find the user ID of the account you want to manually toggle, probably #1:

SELECT * from local_user;

Then update the email_verified and _accepted_application flag on the first account:

UPDATE local_user SET email_verified = 't', accepted_application = 't' WHERE id = 1;

lemmy=# UPDATE local_user SET email_verified = 't', accepted_application = 't' WHERE id = 3; UPDATE 1 lemmy=# UPDATE local_user SET email_verified = 't', email_verified= 't' WHERE id = 3; UPDATE 1 lemmy=#

[–] chrisamoody@thediscussion.site 0 points 1 year ago (1 children)

Thanks for this breakdown, I seem to be having issues with the update statements: lemmy=# UPDATE local_user SET email_verified = ‘t’, accepted_application = ‘t’ WHERE id = 1; ERROR: column "‘t’" does not exist LINE 1: UPDATE local_user SET email_verified = ‘t’, accepted_applica... ^ HINT: Perhaps you meant to reference the column "local_user.id". lemmy=# UPDATE local_user SET email_verified =‘t’, accepted_application = ‘t’ WHERE id = 1; ERROR: column "‘t’" does not exist LINE 1: UPDATE local_user SET email_verified =‘t’, accepted_applicat... ^ HINT: Perhaps you meant to reference the column "local_user.id". lemmy=# UPDATE local_user SET email_verified = ‘t’, accepted_application = ‘t’ WHERE id = 3; UPDATE 1 ERROR: column "‘t’" does not exist LINE 1: UPDATE local_user SET email_verified = ‘t’, accepted_applica... ^ HINT: Perhaps you meant to reference the column "local_user.id". lemmy-#

[–] prothy@lemmy.ml 1 points 1 year ago* (last edited 1 year ago) (2 children)

It seems that the query that Lodion shared has the wrong single quote character, rather than '. Try using it with the latter, I had the same issue as you and this was what fixed it.

yes, I should have realized that. That worked! Thank you @prothy@lemmy.ml

[–] PunkiBas@lemmy.ml 1 points 1 year ago

Now it worked, thanks!