Sha256: af4f179c0c13f7774325a21b22faf57141114c5bb81e98fa2437f3d122c74fab

Contents?: true

Size: 570 Bytes

Versions: 10

Compression:

Stored size: 570 Bytes

Contents

# encoding: utf-8

module ConstructorCore
  class UsersController < ApplicationController
    layout 'constructor_core/application_admin'

    def profile
      @user = current_user
    end

    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
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
constructor-core-0.5.8 app/controllers/constructor_core/users_controller.rb
constructor-cms-0.5.8 core/app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.7 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.6 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.5 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.4 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.3 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.2 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.1 app/controllers/constructor_core/users_controller.rb
constructor-core-0.5.0 app/controllers/constructor_core/users_controller.rb