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

24 lines
515 B
Ruby
Raw Normal View History

2011-04-09 13:20:36 +00:00
class User
include Mongoid::Document
store_in :users
2011-04-09 13:34:56 +00:00
key :name, String
key :password, String
key :email, String
key :regdate, Date
key :invites, Integer
key :referer, Integer
2011-04-09 13:20:36 +00:00
key :active, Integer
2011-04-20 23:05:32 +00:00
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
2011-04-09 13:20:36 +00:00
end