forked from External/greenlight
Merge pull request #223 from bigbluebutton/settings-fix
Fix Greenlight accounts unable to update settings.
This commit is contained in:
commit
29e273f5a1
|
@ -58,7 +58,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
if errors.empty? && @user.save
|
||||
# Notify the use that their account has been updated.
|
||||
# Notify the user that their account has been updated.
|
||||
redirect_to edit_user_path(@user), notice: "Information successfully updated."
|
||||
else
|
||||
# Append custom errors.
|
||||
|
|
|
@ -14,7 +14,7 @@ class User < ApplicationRecord
|
|||
uniqueness: { case_sensitive: false },
|
||||
format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i }
|
||||
|
||||
validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account?
|
||||
validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account?, on: :create
|
||||
|
||||
# We don't want to require password validations on all accounts.
|
||||
has_secure_password(validations: false)
|
||||
|
|
Loading…
Reference in New Issue