Method: Sufia::SufiaHelperBehavior#user_display_name_and_key
- Defined in:
- app/helpers/sufia/sufia_helper_behavior.rb
#user_display_name_and_key(user_key) ⇒ Object
183 184 185 186 187 188 |
# File 'app/helpers/sufia/sufia_helper_behavior.rb', line 183 def user_display_name_and_key(user_key) user = ::User.find_by_user_key(user_key) return user_key if user.nil? user.respond_to?(:name) ? "#{user.name} (#{user_key})" : user_key end |