Skip to content

Commit

Permalink
checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
jctanner committed Oct 4, 2023
1 parent 4133146 commit 2c9cb67
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions dev/scripts.community/verify_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python

import os
import json

from django.contrib.auth import get_user_model


User = get_user_model()



with open('verified_users.json', 'r') as f:
umap = json.loads(f.read())

for user in User.objects.all():
print(f'{user} {user.email}')
if not user.email:
continue

if user.username not in umap:
continue

email = user.email
if not email.endswith('@GALAXY.GITHUB.UNVERIFIED.COM'):
continue

expected_github_id = int(email.replace('@GALAXY.GITHUB.UNVERIFIED.COM', ''))
actual_github_id = umap.get(user.username)
if umap.get(user.username) != expected_github_id:
continue

print(f'\tVERIFIED: {user.username} {expected_github_id} == {actual_github_id}')
user.email = ''
user.save()
#import epdb; epdb.st()

0 comments on commit 2c9cb67

Please sign in to comment.