def user_full_name(strategy, details, user=None, **kwargs):
 if user:
  full_name = details.get(u'fullname', u'').strip()
  if ((not full_name) and ((u'first_name' in details) or (u'last_name' in details))):
   first_name = details.get(u'first_name', u'')
   last_name = details.get(u'last_name', u'')
   if (first_name and (first_name not in last_name)):
    full_name = u'{0} {1}'.format(first_name, last_name)
   elif first_name:
    full_name = first_name
   else:
    full_name = last_name
  full_name = full_name.strip()
  if (len(full_name) > 30):
   full_name = full_name[:30]
  if (full_name and (full_name != user.first_name)):
   user.first_name = full_name
   strategy.storage.user.changed(user)

def user_full_name ( strategy , details , user = None , ** kwargs ) : if user : full_name = details . get ( u'fullname' , u'' ) . strip ( ) if ( ( not full_name ) and ( ( u'first_name' in details ) or ( u'last_name' in details ) ) ) : first_name = details . get ( u'first_name' , u'' ) last_name = details . get ( u'last_name' , u'' ) if ( first_name and ( first_name not in last_name ) ) : full_name = u'{0} {1}' . format ( first_name , last_name ) elif first_name : full_name = first_name else : full_name = last_name full_name = full_name . strip ( ) if ( len ( full_name ) > 30 ) : full_name = full_name [ : 30 ] if ( full_name and ( full_name != user . first_name ) ) : user . first_name = full_name strategy . storage . user . changed ( user )
update user full name using data from provider .