+ // Returns false if the user has no password (which will always
+ // be the case for remote users). This can be the case for OpenID
+ // logins or other mechanisms which don't store a password hash.
+ public function hasPassword()
+ {
+ try {
+ return $this->getUser()->hasPassword();
+ } catch (NoSuchUserException $e) {
+ return false;
+ }
+ }
+