class User::BaseController < ApplicationController
  include User::SessionHelper
  include User::VerificationHelper

  layout "user/layouts/application"
end

class User::BaseController < ApplicationController
  include User::SessionHelper
  include User::VerificationHelper

  layout "user/layouts/application"

  private

  def read_only_user_attributes
    return [] unless auth_modules_present?

    @read_only_user_attributes ||= current_site.configuration.auth_modules_data.inject([]) do |attributes, auth_module|
      attributes | (auth_module.read_only_user_attributes || [])
    end
  end
end

Allow definition of read only user fields from auth modules
Allow definition of read only user fields from auth modules

In config/application.yml, at the auth modules section, for an auth
provider a read_only_user_attributes can be defined, with an array of
user attributes identifiers which the user won't be able to edit. The
attributes identifiers can be both names of attributes defined in the
user model or names of custom user fields. The values for these
attributes are expected to be assigned by the session or census custom
forms provided by the auth provider
