feat(admin-invites): show registered usernames per invite code, track invited_by_code_id on User

This commit is contained in:
earthjasonlin committed 2026-07-06 08:37:49 +08:00
1 parent 46753a7c48
commit 48da00c8e7
3 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -153,7 +153,7 @@ def register_submit(
"register.html", {"request": request, "error": "用户名已存在"}, status_code=400
)
# Create user
new_user = User(username=username, password_hash=hash_password(password))
new_user = User(username=username, password_hash=hash_password(password), invited_by_code_id=code_obj.id)
db.add(new_user)
db.flush()
# Update invite code usage
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.