public function checkPassword($password) {
    switch (Tilmeld::$config['pw_method']) {
      case 'plain':
        return ($this->password == $password);
      case 'digest':
        return ($this->password == hash('sha256', $password));
      case 'salt':
      default:
        return ($this->password == hash('sha256', $password.$this->salt));
    }
  }
public function checkPassword($password) {
    switch (Tilmeld::$config['pw_method']) {
      case 'plain':
        return ($this->password == $password);
      case 'digest':
        return ($this->password == hash('sha256', $password));
      case 'salt':
      default:
        return ($this->password == hash('sha256', $password.$this->salt));
    }
  }
public function checkPassword ( $ password ) { switch ( Tilmeld :: $ config [ 'pw_method' ] ) { case 'plain' : return ( $ this -> password == $ password ) ; case 'digest' : return ( $ this -> password == hash ( 'sha256' , $ password ) ) ; case 'salt' : default : return ( $ this -> password == hash ( 'sha256' , $ password . $ this -> salt ) ) ; } }
Check the given password against the user's.

@param string $password The password in question.
@return bool True if the passwords match, otherwise false.
Check the given password against the user s .