Check that the token is valid before using it.

This commit is contained in:
Tom Hughes 2010-04-20 11:05:55 +01:00
parent 16030e0381
commit 2e202460e6

View file

@ -20,7 +20,7 @@
<%= render :partial => 'search' %>
<%
session[:token] = @user.tokens.create.token unless session[:token]
session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token])
# Decide on a lat lon to initialise potlatch with. Various ways of doing this
if params['lon'] and params['lat']