Methods
A
L
Instance Public methods
after_create(user)
# File app/observers/user_observer.rb, line 2
def after_create(user)
  log_info("User \"#{user.name}\" (#{user.email}) was created")

  Notify.new_user_email(user.id, user.password).deliver
end
after_destroy(user)
# File app/observers/user_observer.rb, line 8
def after_destroy user
  log_info("User \"#{user.name}\" (#{user.email})  was removed")
end
after_save(user)
# File app/observers/user_observer.rb, line 12
def after_save user
  if user.username_changed?
    if user.namespace
      user.namespace.update_attributes(path: user.username)
    else
      user.create_namespace!(path: user.username, name: user.username)
    end
  end
end
Instance Protected methods
log_info(message)
# File app/observers/user_observer.rb, line 24
def log_info message
  Gitlab::AppLogger.info message
end