Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Login

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Thu May 08, 2008 5:24 pm    Post subject: Login Reply with quote

require 'digest/sha2'

class User < ActiveRecord::Base
attr_accessor :password

has_many :events,
:dependent => :destroy
has_many :registrations,
:dependent => :destroy
has_many :activities, :through => :registrations, :source => :event

validates_presence_of :login
validates_length_of :login
validates_uniqueness_of :login
validates_format_of :login, :with => /^[\w\.-]+$/i

validates_presence_of :password, :if => :password_required?
validates_length_of :password, :within => 3...40, :if => :password_required?
validates_confirmation_of :password, :if => :password_required?

before_save :encrypt_new_password

def self.authenticate(login,password)
user = find_by_login(login)
return user if user && user.authenticated?(password)
end

def authenticated?(password)
hashed_password == encrypt(password)
end

protected
def encrypt_new_password
return if password.blank?
self.hashed_password == encrypt(password)
end

def password_required?
hashed_password.blank? || !password.blank?
end


def encrypt(string)
Digest::SHA2.hexdigest(string)
end


end

_________________
This is the inception of deception, checking the depth of your perception.


Last edited by Aviar³ on Thu May 08, 2008 5:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Localhost
I post too much
Reputation: 0

Joined: 28 Apr 2007
Posts: 3402

PostPosted: Thu May 08, 2008 5:26 pm    Post subject: Reply with quote

PHP > Ruby on Rails
_________________
Back to top
View user's profile Send private message MSN Messenger
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Thu May 08, 2008 5:27 pm    Post subject: Reply with quote

Then you>idiot.
_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
Box
Grandmaster Cheater
Reputation: 0

Joined: 16 Oct 2007
Posts: 541

PostPosted: Thu May 08, 2008 5:28 pm    Post subject: Reply with quote

aviar>chicken who golfs in a suit
_________________
zurkei wrote:
Wow box your a real dick, I can't believe I actually thought that you were telling the truth...

Fact: no one tells the truth on cheat engine fourms
Back to top
View user's profile Send private message
Mc Nuggets
Master Cheater
Reputation: 12

Joined: 20 Oct 2007
Posts: 446
Location: NOMANCHES PUTO'S BALLS

PostPosted: Thu May 08, 2008 5:29 pm    Post subject: Reply with quote

aviar=win
Back to top
View user's profile Send private message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Thu May 08, 2008 5:29 pm    Post subject: Reply with quote

magic moo>aviar? Anyways, havent seen you before but hi. If that was meant to be offensive, I didnt quite get if you meant I am better than a chicken by the greater than sign or worse than a chicken.
_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites