mirror of
https://github.com/capricornxl/ad-password-self-service.git
synced 2025-08-12 04:52:43 +08:00
修改钉钉/企业微信直接使用内部应用免密登录的方式来验证,不再支持扫码。
由于一些API的权限发生变化,导致一些关键信息无法获取,所以做以上改变。
This commit is contained in:
@@ -9,6 +9,15 @@
|
||||
import re
|
||||
|
||||
|
||||
def get_email_from_userinfo(user_info):
|
||||
if user_info.get('email') not in ['', None]:
|
||||
return True, user_info.get('email')
|
||||
elif user_info.get('biz_mail') not in ['', None]:
|
||||
return True, user_info.get('biz_mail')
|
||||
else:
|
||||
return False, "当前用户的邮箱或企业邮箱均没配置,请先完善个人信息!"
|
||||
|
||||
|
||||
def format2username(account):
|
||||
"""
|
||||
格式化账号,统一输出为用户名格式
|
||||
|
Reference in New Issue
Block a user