Hello,
Im a newb. Im trying to authenticate a user then print out the
username. What am I doing wrong?
Thanks
jason
unless session[:user]
@user = Auth.find(:first , :conditions => ["username=? AND
password=?", params[:username] , params[:password]])
session[:user] = @user if @user
render(:inline=> "#{ session[:user].username } " ) && return;
else
On 7/13/06, Jason D. [email protected] wrote:
session[:user] = @user if @user
render(:inline=> "#{ session[:user].username } " ) && return;
else
Are your passwords really stored in plaintext in your database?
On Fri, 2006-07-14 at 00:13 -0500, James L. wrote:
@user = Auth.find(:first , :conditions => ["username=? AND password=?", params[:username] , params[:password]])
session[:user] = @user if @user
render(:inline=> "#{ session[:user].username } " ) && return;
else
Are your passwords really stored in plaintext in your database?
yes :x
its just a test database to play with ruby.
Any idea why i can print the username?
thanks,
jason