Class: ConstructorCore::UsersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/constructor_core/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#profileObject



7
8
9
# File 'app/controllers/constructor_core/users_controller.rb', line 7

def profile
  @user = current_user
end

#update_passwordObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/constructor_core/users_controller.rb', line 11

def update_password
  @user = current_user

  if params[:user][:password] == params[:user][:password_confirm]
    @user.password = params[:user][:password]

    if @user.save
      redirect_to '/login', :notice => t(:password_changed)
      return
    end
  end

  redirect_to :back, :notice => t(:password_error_confirm)
end