title: AttributeError: 'User' object has no attribute 'is_active'
body: <p>I try to run my app for login But when I submit the form to check the user id and email I got this error.AttributeError: 'User' object has no attribute 'is_active' So Thanks if you help </p>
  
  <pre><code>   rv = self.dispatch_request()
  
      File "/home/peg/flask/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
  
      return self.view_functions[rule.endpoint](**req.view_args)
  
      File "/home/peg/flask/app/view.py", line 45, in login
  
      login_user(user_in_db, remember = form.remember_me.data)
  
      File "/home/peg/flask/venv/lib/python2.7/site-packages/flask_login.py", line 675, in login_user
  
      if not force and not user.is_active():
  </code></pre>
  
  <blockquote>
    <p>view.py</p>
  </blockquote>
  
  <pre><code>@app.route('/login', methods = ['GET', 'POST'])
  def login():
      form = LoginForm()
      #checks if the user is authernticated
      #or not, if yes it skips authentfic.
      if current_user is not None and current_user.is_authenticated():
              return redirect(request.args.get('next') or url_for('index'))
      #does not allow user to use get method
      if request.method == 'GET':
              return render_template('login.html',
                      form = form,
                      title = 'Login')
  
      #taking the user submitted data and checking if it exists in the database
      user_in_db = User.query.filter_by(name=form.name.data.lower()).first()
  
      #if the username is not wrong
      if user_in_db is not None and user_in_db != False:
              if form.email.data !=  user_in_db.email:
                      flash('email is incorrect')
                      return redirect(url_for('login'))
              #here I got error
              login_user(user_in_db, remember = form.remember_me.data)
              return redirect(request.args.get('next') or url_for('index'))
      else:
         flash('Username does not exists')
         return render_template('login.html',
              form = form,
              title = 'Login')
  </code></pre>
  
  <p>model.py</p>
  
  <pre><code>class User(db.Model):
     __tablename__ = "Contacts"
     id = db.Column(db.Integer, primary_key = True)
     name = db.Column(db.String(50))
     email = db.Column(db.String(50))
     age = db.Column(db.Integer)
  
  def __init__(self, name, email, age ):
      self.name = name
      self.email = email
      self.age = age
  
  def is_authenticated(self):
      return True
  
  def is_active(self):
      return True
  
  def is_anonymous(self):
      return False
  
  def get_id(self):
      return unicode(self.id)
  
  
  def __repr__(self):
      return '&lt;User %r&gt;' %(self.name)
  </code></pre>