mirror of
https://github.com/retspen/webvirtcloud
synced 2025-01-12 16:35:17 +00:00
9 lines
265 B
Python
9 lines
265 B
Python
from django_otp import devices_for_user
|
|
from django_otp.plugins.otp_totp.models import TOTPDevice
|
|
|
|
|
|
def get_user_totp_device(user):
|
|
devices = devices_for_user(user)
|
|
for device in devices:
|
|
if isinstance(device, TOTPDevice):
|
|
return device
|