title: how to compare a password in symfony2 with fosuserbundle?
body: <p>this is my fuction code but iam get this error  Call to a member function get() on null. so help me please</p>
  
  <pre><code>public function verificarSenhaDefaultAction() {
          $a = "12345678";
          $default = $this-&gt;get('security.password_encoder')-&gt;encodePassword($this-&gt;getUser(), $a);
  
          if ($this-&gt;getUser()-&gt;getPassword() == $default):
              return TRUE;
          else:
              Return FALSE;
          endif;
      }
  </code></pre>