1
0
Fork 0
oldhaven/app/models/user.rb

24 lines
515 B
Ruby

class User
include Mongoid::Document
store_in :users
key :name, String
key :password, String
key :email, String
key :regdate, Date
key :invites, Integer
key :referer, Integer
key :active, Integer
def logged_in
unless request.session['session_id'].nil? or MainController.logged_in session['session_id']
redirect_to '/login'
return
else
if request.session['session_id'].nil?
redirect_to '/login'
return
end
end
end
end