update password functionality typo
closes #3949 (github issue 10) Change-Id: I40415f036a61de04a7432773eecaa6ba4c58fa9b Reviewed-on: https://gerrit.instructure.com/2492 Reviewed-by: Brian Palmer <brianp@instructure.com> Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
parent
ba79806c56
commit
584300e2ec
|
@ -142,7 +142,7 @@ class ProfileController < ApplicationController
|
|||
pseudonymed = true
|
||||
flash[:error] = "Invalid old password for the login #{pseudonym_to_update.unique_id}"
|
||||
format.html { redirect_to profile_url }
|
||||
format.json { render :json => pseudonym.errors.to_json, :status => :bad_request }
|
||||
format.json { render :json => pseudonym_to_update.errors.to_json, :status => :bad_request }
|
||||
end
|
||||
if change_password != '1' || !pseudonym_to_update || !pseudonym_to_update.valid_password?(old_password)
|
||||
params[:pseudonym].delete :password
|
||||
|
@ -153,7 +153,7 @@ class ProfileController < ApplicationController
|
|||
pseudonymed = true
|
||||
flash[:error] = "Login failed to update"
|
||||
format.html { redirect_to profile_url }
|
||||
format.json { render :json => pseudonym.errors.to_json, :status => :bad_request }
|
||||
format.json { render :json => pseudonym_to_update.errors.to_json, :status => :bad_request }
|
||||
end
|
||||
end
|
||||
if params[:default_communication_channel_id]
|
||||
|
|
Loading…
Reference in New Issue