removed the possibility that the name of external users might be in the displayname alltogether

This commit is contained in:
Ralf Teusner
2017-04-03 13:22:12 +02:00
parent 75481d902b
commit 156d921145

View File

@ -5,7 +5,7 @@ class ExternalUser < ActiveRecord::Base
validates :external_id, presence: true
def displayname
result = name
result = "User " + user_id
if(!consumer.nil? && consumer.name == 'openHPI')
result = Rails.cache.fetch("#{cache_key}/displayname", expires_in: 12.hours) do
Xikolo::UserClient.get(external_id.to_s)[:display_name]