<commit_before>module Omnisocial
  class User < ActiveRecord::Base
    self.abstract_class = true
    
    has_one :login_account, :class_name => 'Omnisocial::LoginAccount', :dependent => :destroy
    delegate :login, :name, :picture_url, :account_url, :access_token, :to => :login_account

    def to_param
      if !self.login.include?('profile.php?')
        "#{self.id}-#{self.login.gsub('.', '-')}"
      else
        self.id.to_s
      end
    end

    def from_twitter?
      login_account.kind_of? TwitterAccount
    end

    def from_facebook?
      login_account.kind_of? FacebookAccount
    end

    def from_linked_in?
      login_account.kind_of? LinkedInAccount
    end

    def remember
      update_attributes(:remember_token => ::BCrypt::Password.create("#{Time.now}-#{self.login_account.type}-#{self.login}")) unless new_record?
    end

    def forget
      update_attributes(:remember_token => nil) unless new_record?
    end
  end
end
<commit_msg>Delegate :access_token_secret<commit_after>module Omnisocial
  class User < ActiveRecord::Base
    self.abstract_class = true
    
    has_one :login_account, :class_name => 'Omnisocial::LoginAccount', :dependent => :destroy
    delegate :login, :name, :picture_url, :account_url, :access_token, :access_token_secret, :to => :login_account

    def to_param
      if !self.login.include?('profile.php?')
        "#{self.id}-#{self.login.gsub('.', '-')}"
      else
        self.id.to_s
      end
    end

    def from_twitter?
      login_account.kind_of? TwitterAccount
    end

    def from_facebook?
      login_account.kind_of? FacebookAccount
    end

    def from_linked_in?
      login_account.kind_of? LinkedInAccount
    end

    def remember
      update_attributes(:remember_token => ::BCrypt::Password.create("#{Time.now}-#{self.login_account.type}-#{self.login}")) unless new_record?
    end

    def forget
      update_attributes(:remember_token => nil) unless new_record?
    end
  end
end

{'fraction_non_alphanumeric': 0.11702127659574468, 'fraction_numerical': 0.0, 'mean_word_length': 3.265658747300216, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4485647', 'n_tokens_mistral': 630, 'n_tokens_neox': 625, 'n_words': 124}