forked from External/greenlight
* Added back fix for ldap image * Fixed issue with ldap redirect
This commit is contained in:
parent
973c95339c
commit
e0afcdec23
|
@ -71,7 +71,13 @@ class UsersController < ApplicationController
|
|||
providers = configured_providers
|
||||
if (!allow_user_signup? || !allow_greenlight_accounts?) && providers.count == 1 &&
|
||||
!Rails.configuration.loadbalanced_configuration
|
||||
return redirect_to "#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
|
||||
provider_path = if Rails.configuration.omniauth_ldap
|
||||
ldap_signin_path
|
||||
else
|
||||
"#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
|
||||
end
|
||||
|
||||
return redirect_to provider_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ class User < ApplicationRecord
|
|||
u.name = auth_name(auth) unless u.name
|
||||
u.username = auth_username(auth) unless u.username
|
||||
u.email = auth_email(auth)
|
||||
u.image = auth_image(auth)
|
||||
u.image = auth_image(auth) unless u.image
|
||||
u.email_verified = true
|
||||
u.save!
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue