# HACK HACK HACK -- how to do attr_accessible from here?
# prevents a user from submitting a crafted form that bypasses activation
# anything else you want your user to change should be added here.
- attr_accessible :login, :email, :name, :password, :password_confirmation
- attr_accessor :token_authenticated
+ attr_accessible :login, :email, :name, :password, :password_confirmation, :external_identity, :external_identity_provider
+ attr_accessor :token_authenticated, :external_identity, :external_identity_provider
####
# As now dates are saved in long they should be no more automatically managed by Rails
return nil if !Api::Utils.java_facade.getSettings().getBoolean('sonar.authenticator.createUsers')
# Automatically create a user in the sonar db if authentication has been successfully done
user = User.new(:login => username, :name => username, :email => '', :created_at => now, :updated_at => now)
+ user.external_identity = username
+ user.external_identity_provider = 'sonarqube'
if details
user.name = details.getName()