Displaying 12 results from an estimated 12 matches for "authenticated_users".
Did you mean:
authenticated_user
2006 May 02
9
Updating only one field
At present, I use an update like this to set the user''s last login time:
authenticated_user.update_attribute(:last_login, Time.now)
However, this calls the following, updating all fields:
UPDATE users SET `last_login` = ''2006-05-02 13:27:41'', `hashed_password`
= ....
Is there any way I can tell ActionRecord to only update the one field?
I don''t really want
2006 Aug 30
3
extracting username
Forgive my ignorance ya''ll. I''m trying to extract a username from a
table using the user id.
I''ve tried:
@authenticated_user = User.find(:first, :select => "login", :conditions
=> "id = ''1''")
AND:
@authenticated_user = User.find_by_sql("select login from users where
id=''1''")
within an action that
2007 Dec 12
1
why is authenticate_with_http_basic undefined?
Hi,
i used the rick olson''s restful_authentication plugin
rails 1.2.6
i wanted to check for authenticated user so i wrote this in my
application.rb
# Filters
before_filter :authenticate
# Sets @authenticated_user if the user provides valid
# credentials. May be used to deny access or customise the view
def authenticate
@authenticated_user = nil
2006 May 14
0
login engine -- no such file to load -- authenticated_user
Ive followed the rail engines doc to the letter and I get this error message
It is in the proper direcotry vendor/plugins/login_engine/lib/login_engine
What could be wrong??
Clayton Cottingham
WinterMarket Networks
Phone: (604) 417-3254
Vancouver, B.C. Canada
http://www.wintermarket.net
MSN:drfrog666@hotmail.com
AIM:drfrogrx
-------------- next part --------------
An
2005 Dec 02
8
UserEngine: stack level too deep
Hi,
I''m trying to get the UserEngine running.
I have installed the LoginEngine, added the essential lines to
environment.rb / application.rb and application_helper.rb.
Worked fine.
Then I did the same with the UserEngine and when trying to set up the
db:
rake engine_migrate ENGINE=user
I get:
Migrating engine ''user_engine''
rake aborted!
stack level too deep
But...
2006 Apr 25
5
Authorisation question
My authentication (signup/login) is up and running in my app, now I need
to implement an authorisation system. Its not going to be a complex
one. One admin (me) and then normal members and premium members. Any
tutorials or tips on a simple way to get this running? Thanks.
--
Posted via http://www.ruby-forum.com/.
2007 May 03
3
0.9.2 redirect_to no longer accepts hash?
Why am I now getting these errors?
expected redirect to {:action=>"index"}, got redirect to
"http://test.host/authenticated_users"
I know in the AuthenticatedUsersController, the redirect call is
redirect_to :action => ''index''
So why should I have to convert this to a url in my specs?
2006 May 15
5
Login generator errors.
Okay, I download login generator and I used it on my new app but, it''s
not working correctly. If the user logins on the same session as he
created he will login if it isn''t the same session it fails. What''s
going on?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 13
7
Problem with params
I''ve got a User model, which holds the following (excerpt):
def try_to_authenticate
User.authenticate(self.username, self.password)
end
..
private
def self.hash_password(password)
Digest::SHA1.hexdigest(password)
end
def self.authenticate(username, password)
@user = User.find(:all, :conditions => ["username = ? AND
password = ?",
2006 Mar 16
6
Sessions or lookups?
My application needs to know if a user is an administrator, for security
and aesthetic reasons. At the moment, I store true/false in the session
by doing the following at login:
session[:user_is_admin] = authenticated_user.is_admin?
Is this OK to do? Or should I really be doing the following every time:
User.find(session[:user_id]).is_admin?
(user_id is always in the session too)
Is there
2006 Mar 03
1
weird error with login engine
Any ideas what would cause the following exception (using the login engine):
--------------------------------------
Full executation backtrace:
--------------------------------------
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1697:in
`execute_callstack_for_multiparameter_attributes''
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1677:in
2006 May 15
2
login engine error
Hi everybody,
I am new to rails.
I get the following error when run the rake engine:migrate for the
engine login_engine.
------------------------------------------------------------------------
gbalaji:~/projects/test/vendor/plugins/login_engine gopalbalaji$ rake
engine_migrate ENGINE=log --trace
(in /Users/gopalbalaji/Projects/test)
** Invoke engine_migrate (first_time)
** Invoke