Displaying 12 results from an estimated 12 matches for "authenticated_us".
Did you mean:
authenticated_as
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 wan...
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 corresponds to a view that has <%=
@authenticate...
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
authenticate_with_http_basic do |user, pass|
@authenticated_user = User.authenticate(user, pass)
end
return true
end
#Filter for act...
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
..._presence_of''
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:378:in
`each''
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/validations.rb:378:in
`validates_presence_of''
D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:16:in
`included''
D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:9:in
`class_eval''
D:/rails/dammit-core/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:9:in
`class_eval''
D:/rails/dammit-core/vendor/plugins...
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
...e user object we found
@user
end
However, when called from my LoginController, like so:
def login
if request.get?
session[:user_id] = nil
@user = User.new
else
@user = User.new(params[:user])
# TODO: wrap this in a rescue block to handle exception
authenticated_user = @user.try_to_authenticate
if authenticated_user
session[:user_id] = authenticated_user.id
redirect_to :action => session[:intended_action], :controller =>
session[:intended_controller]
else
flash[:notice] = ''Invalid username or 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 a nicer way to do this, or should I be using one of the above?
Cheers.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 03
1
weird error with login engine
...ttributes=''
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:1188:in
`initialize_without_callbacks''
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/callbacks.rb:236:in
`initialize''
[RAILS_ROOT]/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb:78:in
`initialize''
[RAILS_ROOT]/vendor/plugins/login_engine/app/controllers/user_controller.rb:37:in
`new''
[RAILS_ROOT]/vendor/plugins/login_engine/app/controllers/user_controller.rb:37:in
`signup''
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/b...
2006 May 15
2
login engine error
...test/vendor/plugins/login_engine gopalbalaji$ rake
engine_migrate ENGINE=log --trace
(in /Users/gopalbalaji/Projects/test)
** Invoke engine_migrate (first_time)
** Invoke db:migrate:engines (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
no such file to load -- authenticated_user
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__''
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require''
/User...