<commit_before><?php

/**
 * Subclass for representing a row from the 'member' table.
 *
 * 
 *
 * @package lib.model
 */ 
class Member extends BaseMember
{
  public function getProfiles()
  {
    return MemberProfilePeer::getProfileListByMemberId($this->getId());
  }

  public function getProfile($profileName)
  {
    $profile = MemberProfilePeer::retrieveByMemberIdAndProfileName($this->getId(), $profileName);

    if (!$profile)
    {
      return null;
    }

    return $profile->getValue();
  }

  public function getConfig($configName)
  {
    $config = MemberConfigPeer::retrieveByNameAndMemberId($configName, $this->getId());

    if (!$config)
    {
      return null;
    }

    return $config->getValue();
  }

  public function setConfig($configName, $value)
  {
    $config = MemberConfigPeer::retrieveByNameAndMemberId($configName, $this->getId());
    if (!$config)
    {
      $config = new MemberConfig();
      $config->setMember($this);
      $config->setName($configName);
    }
    $config->setValue($value);
    $config->save();
  }

  public function getFriends($limit = null)
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND, true);
    if (!is_null($limit)) {
      $c->setLimit($limit);
    }
    return $this->getMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function countFriends()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND, true);
    return $this->countMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function getFriendPreTo()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->getMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function countFriendPreTo()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->countMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function getFriendPreFrom()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->getMemberRelationshipsRelatedByMemberIdFrom($c);
  }

  public function countFriendPreFrom()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->countMemberRelationshipsRelatedByMemberIdFrom($c);
  }

  public function getImage()
  {
    $c = new Criteria();
    $c->addDescendingOrderByColumn(MemberImagePeer::IS_PRIMARY, true);
    $result = $this->getMemberImages($c);

    if ($result)
    {
      return array_shift($result);
    }

    return false;
  }
  
  public function getImageFileName()
  {
    return $this->getImage()->getFile();
  }
}<commit_msg>fixed Member doesn't access homepage and profile<commit_after><?php

/**
 * Subclass for representing a row from the 'member' table.
 *
 * 
 *
 * @package lib.model
 */ 
class Member extends BaseMember
{
  public function getProfiles()
  {
    return MemberProfilePeer::getProfileListByMemberId($this->getId());
  }

  public function getProfile($profileName)
  {
    $profile = MemberProfilePeer::retrieveByMemberIdAndProfileName($this->getId(), $profileName);

    if (!$profile)
    {
      return null;
    }

    return $profile->getValue();
  }

  public function getConfig($configName)
  {
    $config = MemberConfigPeer::retrieveByNameAndMemberId($configName, $this->getId());

    if (!$config)
    {
      return null;
    }

    return $config->getValue();
  }

  public function setConfig($configName, $value)
  {
    $config = MemberConfigPeer::retrieveByNameAndMemberId($configName, $this->getId());
    if (!$config)
    {
      $config = new MemberConfig();
      $config->setMember($this);
      $config->setName($configName);
    }
    $config->setValue($value);
    $config->save();
  }

  public function getFriends($limit = null)
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND, true);
    if (!is_null($limit)) {
      $c->setLimit($limit);
    }
    return $this->getMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function countFriends()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND, true);
    return $this->countMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function getFriendPreTo()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->getMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function countFriendPreTo()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->countMemberRelationshipsRelatedByMemberIdTo($c);
  }

  public function getFriendPreFrom()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->getMemberRelationshipsRelatedByMemberIdFrom($c);
  }

  public function countFriendPreFrom()
  {
    $c = new Criteria();
    $c->add(MemberRelationshipPeer::IS_FRIEND_PRE, true);
    return $this->countMemberRelationshipsRelatedByMemberIdFrom($c);
  }

  public function getImage()
  {
    $c = new Criteria();
    $c->addDescendingOrderByColumn(MemberImagePeer::IS_PRIMARY, true);
    $result = $this->getMemberImages($c);

    if ($result)
    {
      return array_shift($result);
    }

    return false;
  }
  
  public function getImageFileName()
  {
    if($this->getImage())
    {
      return $this->getImage()->getFile();
    }
    return false;
  }
}
{'fraction_non_alphanumeric': 0.14174541411895497, 'fraction_numerical': 0.0, 'mean_word_length': 3.739244951712028, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 58, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1508019', 'n_tokens_mistral': 1750, 'n_tokens_neox': 1708, 'n_words': 301}