def get_fullname(user=None):
 if (not user):
  user = frappe.session.user
 if (not hasattr(frappe.local, u'fullnames')):
  frappe.local.fullnames = {}
 if (not frappe.local.fullnames.get(user)):
  p = frappe.db.get_value(u'User', user, [u'first_name', u'last_name'], as_dict=True)
  if p:
   frappe.local.fullnames[user] = (u' '.join(filter(None, [p.get(u'first_name'), p.get(u'last_name')])) or user)
  else:
   frappe.local.fullnames[user] = user
 return frappe.local.fullnames.get(user)

def get_fullname ( user = None ) : if ( not user ) : user = frappe . session . user if ( not hasattr ( frappe . local , u'fullnames' ) ) : frappe . local . fullnames = { } if ( not frappe . local . fullnames . get ( user ) ) : p = frappe . db . get_value ( u'User' , user , [ u'first_name' , u'last_name' ] , as_dict = True ) if p : frappe . local . fullnames [ user ] = ( u' ' . join ( filter ( None , [ p . get ( u'first_name' ) , p . get ( u'last_name' ) ] ) ) or user ) else : frappe . local . fullnames [ user ] = user return frappe . local . fullnames . get ( user )
get the full name of the user from user .