liquid_feedback_frontend
view env/util/is_profile_field_locked.lua @ 1412:b42bea44f26c
Sorting unit names in registration form
| author | bsw | 
|---|---|
| date | Mon Aug 20 18:43:17 2018 +0200 (2018-08-20) | 
| parents | 32cc544d5a5b | 
| children | 
 line source
     1 function util.is_profile_field_locked(member, field_name)
     2   if member.authority == "ldap" then
     3     if config.ldap.member.locked_profile_fields and config.ldap.member.locked_profile_fields[field_name] 
     4         or field_name == "login" 
     5         or field_name == "password" 
     6     then
     7       return true
     8     end
     9   end
    11   if member.authority and string.sub(member.authority, 1, 7) == "oauth2_" then
    12     if field_name == "login" or field_name == "password" or field_name == "notify_email" then
    13       return true
    14     end
    15   end
    17   if config.locked_profile_fields[field_name] then
    18     return true
    19   end
    21   return false
    22 end
