Sha256: 18b94b54334198c2c355f199013c94e4ec606162365be1da3f6081c3f678c3e0
Contents?: true
Size: 767 Bytes
Versions: 11
Compression:
Stored size: 767 Bytes
Contents
# -*- encoding : utf-8 -*- class UsersController < ApplicationController def index @today = Date.today @xmains = current_user.xmains.in(status:['R','I']).asc(:created_at) end # mindapp methods def update_user # can't use session, current_user inside mindapp methods $user.update_attribute :email, $xvars["enter_user"]["user"]["email"] end def change_password # check if old password correct identity = Identity.find_by :code=> $user.code if identity.authenticate($xvars["enter"]["epass"]) identity.password = $xvars["enter"]["npass"] identity.password_confirmation = $xvars["enter"]["npass_confirm"] identity.save ma_log "Password changed" else ma_log "Unauthorized access" end end end
Version data entries
11 entries across 11 versions & 2 rubygems