search for: old_salt

Displaying 1 result from an estimated 1 matches for "old_salt".

2007 Nov 17
18
Syntax Problem
...ersion and write it in the new crypted_password field. Here is my code add on before the logged_in?: def create # if no password use old md5 and fill in with sha2 user = User.find_by_login(params[:login]) if #{user.crypted_password} == nil #check_md5? (params[:password],#{user.old_salt},#{user.hashed_password}) @p = Digest::MD5::hexdigest("#{params[:password]}") @s = Digest::MD5::hexdigest(user.old_salt) @pw = Digest::MD5.hexdigest(@s+@p) if @pw == #{user.hashed_password} flash.now[:notice] = "Passed" # need to wri...