similar to: authlogic fails on existing accounts when crypted_password is blank

Displaying 20 results from an estimated 300 matches similar to: "authlogic fails on existing accounts when crypted_password is blank"

2009 Nov 20
3
Proper usage of identify(label)
I was reading this page: http://api.rubyonrails.org/classes/Fixtures.html#M000326 and was trying to get hashed labels working. However, calling it from within a unit test results in this error: def test_defaults_to_disabled identify(''one'') end 2) Error: test_defaults_to_disabled(AdminTest): NoMethodError: undefined method `identify'' for
2009 Nov 20
3
Ensuring that foreign key is valid
I am trying to set up a validation in a model to ensure that a record can''t be saved unless the foreign key it belongs_to is a valid record. My model says: class Admin < ActiveRecord::Base validates_presence_of :user_id validates_numericality_of :user_id validates_uniqueness_of :user_id validates_associated :user belongs_to :user end but I can still create an admin
2009 Nov 17
2
rake db:seed with authlogic fails to populate users
I have a db/seeds.rb file that I want to load, but while the rest of the seeds file works fine, nothing is ever populated in :users. I just fails silently, so I can''t figure out what exactly is causing the problem. I have authlogic installed into the user.rb model with acts_as_authentic. I''m sure that''s part of the problem, but I''m not sure that manually
2012 Mar 22
1
Rspec not loading fixtures
I am taking over a code base and am trying to run the tests. I am somewhat new to RSpec so this might be a trivial problem. Basically I can tell that the fixtures are not getting loaded. All 100 tests fail with a similar error. But I don''t know why. Below is the code, with my narrative with *** before it... Can you see anything or give me a clue where to look. So far I am coming up
2007 Nov 17
18
Syntax Problem
I admit I am stuck. I am converting a legacy php site to ROR. The old site uses MD5, a security flaw waiting to happen. I upgraded to AAA and am adding code in the session_controller.rb file to see if crypted_password is blank. If it is, crypt and check the password against the old md5 version and write it in the new crypted_password field. Here is my code add on before the logged_in?: def
2006 Jul 17
19
updating model
hello, i am writing a simple user login system. when registering a user account, i have two field: password password_confirmation which are validated using validates_presence_of validates_confirmation_of and these are then used to generate a password hash which is stored in my database when i want to update the record (without changing the password and entering new values for password and
2012 Jun 11
0
Using AuthLogic
Hello, I''m trying to use the authlogic to make my login in my app. The problem is when I change my user model. user model: class User < ActiveRecord::Base attr_accessible :crypted_password, :email, :password_salt, :persistence_token, :username acts_as_authentic end create_users migration class CreateUsers < ActiveRecord::Migration def change create_table :users do |t|
2006 Mar 24
0
undefined method `crypted_password='' while using Sentry
I''d like to hear from some one who has been using Sentry successfully. I am trying to symmetrically_encrypts :password for a user model. It is a bare bones model just to test Sentry. I have password defined as ''text'' in the users table. I have openssl library installed on Debian Sarge. The secret key is defined in environment.rb. But when I submit the form I get
2007 Jul 12
2
[AVS] Question concerning reverse synchronization of a zpool
Hi, I''m struggling to get a stable ZFS replication using Solaris 10 110/06 (actual patches) and AVS 4.0 for several weeks now. We tried it on VMware first and ended up in kernel panics en masse (yes, we read Jim Dunham''s blog articles :-). Now we try on the real thing, two X4500 servers. Well, I have no trouble replicating our kernel panics there, too ... but I think I
2014 Feb 17
1
ldap_modify change password
Hello, I would like to change samba4 AD user's password using php. Here's my code: function UpdateLdapPassword($username, $newpassword) { global $ds; global $rdn; $entry["clearTextPassword"][0]=base64_encode(iconv('UTF-8','UTF-16LE',$newpassword)); $bReturn= ldap_modify ($ds, $rdn, $entry);
2006 Jun 09
18
Is IRB the ruby console ?
I''m running script/console but keep getting the message that irb.bat is not recognized as an internal or external command, operable program or batch file. If it means anything I am running instant rails. I can invoke irb straight forward. TIA Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.
2006 Jul 27
2
Creating multiple objects from form data
I''m in the process of creating a sign up form for an online application. The form collects account info, company info, and then info for an administrative user. The method looks like this: def create @account = Account.create!(params[:account]) @company = @account.companies.create!(params[:company]) @user = @company.users.create!(params[:user]) end However, this inevitably fails
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username and password, my setup is firstname, lastname, password. I seemed to be gramatically challenged and not sure how to set up the parameter list. Can anyone offer up a suggestion. The book shows the method starting like: if request.post? user = User.find(:first, :conditions => [''username = ?'' ,
2006 Apr 26
1
Possible acts_as_authenticated bug (or rails)
The code that comes with the plugin uses a method that looks like this: def password_required? crypted_password.blank? or not password.blank? end with validations that look like this: validates_presence_of :password, :if => :password_required? validates_presence_of :password_confirmation, :if => :password_required? validates_length_of
2006 Apr 21
1
Catch authentication result from a model in a controller
Im still following the authorization recipe from the book, now all works fine but im getting trouble in how handle the model authorization result, if the user and pass are correct, it goes to a welcome screen(admin.rhtml) but if wrong the model prints a message in an ugly exception like page "usr and pass not correct", i want to redirect the user to the login
2006 Aug 07
2
Bind variables error
wrong number of bind variables (0 for 2) in: first_name = ? AND last_name = ? I''m not sure why I"m getting this error ? def self.authenticate(first_name, last_name, password) user = User.find(:first, :conditions => [''first_name = ? AND last_name = ?'']) if user.blank? Digest::SHA256.hexdigest(password + user.password_salt) != user.password_hash
2006 Aug 07
3
wrong number of bind variables
I''m getting this error message since i moved alot of the database logic to the model. wrong number of bind variables (0 for 2) in: first_name = ? AND last_name = ? def self.authenticate(first_name, last_name, password) user = User.find(:first, :conditions => [''first_name = ? AND last_name = ?'']) if user.blank? Digest::SHA256.hexdigest(password +
2011 Jun 29
1
dns.keytab for Samba4 and Bind9
Hi, When provisioning a new domain, samba4 creates /usr/local/samba/private/dns.keytab. What's the best way to create that file manually, when not provisioning a new domain? My use case is how one migrates from a Windows AD+DNS to samba4+bind9. I begin by joining a new samba4 instance as a DC to an existing Windows domain (so no "/source4/setup/provision"), then getting rid of the
2010 Feb 04
2
Encrypt a user password using "Authlogic"
Hi, I have a csv file which have the user detail. I want to migrate this information into the "users" table. My application use "Authlogic" for user aunthentication so I have to encrypt the password during migration. I have written the script which is reading the csv file and adds the record into "users" table, it is working fine. But I am not able to encrypt the