|
a/Allura/allura/model/auth.py |
|
b/Allura/allura/model/auth.py |
|
... |
|
... |
315 |
|
315 |
|
316 |
@classmethod
|
316 |
@classmethod
|
317 |
def by_username(cls, name):
|
317 |
def by_username(cls, name):
|
318 |
if not name:
|
318 |
if not name:
|
319 |
return cls.anonymous()
|
319 |
return cls.anonymous()
|
|
|
320 |
user = cls.query.get(username=name)
|
|
|
321 |
if user:
|
|
|
322 |
return user
|
320 |
return plugin.AuthenticationProvider.get(request).by_username(name)
|
323 |
return plugin.AuthenticationProvider.get(request).by_username(name)
|
321 |
|
324 |
|
322 |
@classmethod
|
325 |
@classmethod
|
323 |
def by_display_name(cls, name):
|
326 |
def by_display_name(cls, name):
|
324 |
return plugin.UserPreferencesProvider.get().find_by_display_name(name)
|
327 |
return plugin.UserPreferencesProvider.get().find_by_display_name(name)
|