original_string: public function canResetPassword(\Gems_User_User $user = null)
      {
          if ($user) {
              // Depends on the user.
              if ($user->hasEmailAddress() && $user->canSetPassword()) {
                  $email = $user->getEmailAddress();
                  if (empty($email)) {
                      return false;
                  } else {
                      return true;
                  }
              }
          } else {
              return true;
          }
      }
code: public function canResetPassword(\Gems_User_User $user = null)
      {
          if ($user) {
              // Depends on the user.
              if ($user->hasEmailAddress() && $user->canSetPassword()) {
                  $email = $user->getEmailAddress();
                  if (empty($email)) {
                      return false;
                  } else {
                      return true;
                  }
              }
          } else {
              return true;
          }
      }
code_tokens: public function canResetPassword ( \ Gems_User_User $ user = null ) { if ( $ user ) { // Depends on the user. if ( $ user -> hasEmailAddress ( ) && $ user -> canSetPassword ( ) ) { $ email = $ user -> getEmailAddress ( ) ; if ( empty ( $ email ) ) { return false ; } else { return true ; } } } else { return true ; } }
docstring: Return true if a password reset key can be created.
  
  Returns the setting for the definition whan no user is passed, otherwise
  returns the answer for this specific user.
  
  @param \Gems_User_User $user Optional, the user whose password might change
  @return boolean
docstring_tokens: Return true if a password reset key can be created .