You wouldn't set an auto-login, you simply would not deny access to
whatever action(s) you wish them to have access to.
On Aug 19, 12:48 am, Marojahan M.T. Sigiro maroja...@gmail.com
wrote:
with Auth.. what should i do to create auto login mechanism for certain user
(e.g. guest)
anybody has
with Auth.. what should i do to create auto login mechanism for certain user
(e.g. guest)
anybody has an idea? since i'm still a newbie with cake
Thankyou
--
---
I Don't Know Who/What I Am Yet, But I Know Who/What I Am Not!
--
Marojahan M.T. Sigiro
maroja
-autoRedirect = true;
$this-Auth-loginAction = array(
'controller' = 'users',
'action' = 'login'
);
$this-Auth-loginRedirect = array(
'controller' = 'public_static',
'action' = 'display
-fields = array('username' = 'email', 'password' =
'password');
$this-Auth-loginError = 'No matching user found.';
$this-Auth-autoRedirect = true;
$this-Auth-loginAction = array(
'controller' = 'users',
'action' = 'login
Hi all,
I have a question with regards to the login method, which in the blog
tutorial in the manual and other tutorials is left blank and handled
magically by the Auth component.
I am concerned with security when it comes to what is input by the
user. Does the Auth component filter/clean
Hello all :)
I'm using the Auth to login into my system and I have a litle problem.
Any time I like to login I have to enter two times the Login
information.
i.e. :
I enter my login informations and press login.
After this my system return back to login screen
I re-enter my login informations
Hello all :)
I need a litle help about CakePHP and AJAX.
I'm creating an application by using CakePHP and ExtJS.
I already have create the login script tha work perfectly.
I can feel the login form, send the data to CakePHP via $_POST and
then Auth makes all the important thinks to login
There is none who know how can I redirect after Ajax Login ? ? ?
On 23 Ιούλ, 12:01, DatacenterHellas merianosni...@gmail.com wrote:
Hello all :)
I need a litle help about CakePHP and AJAX.
I'm creating an application by using CakePHP and ExtJS.
I already have create the login script tha
in posts folder and posts_controller.php
Actual learning is i would like to merge blog post and login authntication
aplication to single sample application
Any great tips
Regards,
Dhileep
--~--~-~--~~~---~--~~
You received this message because you are subscribed
ugly).
So I think I've done the hard part, but I'm unsure how to do the
simple bit.
How should I change the login functionality to check the user's
status? It currently checks the password using Auth out-of-the-box
functionality i.e. uses an empty login() function in the Users
controller.
Should I
) embedded on the link and sets
a Validated flag on the user record. This works fine (although the
email looks a little ugly).
So I think I've done the hard part, but I'm unsure how to do the
simple bit.
How should I change the login functionality to check the user's
status? It currently
/articles/view/simple-form-authentication-in-1-2-x-x
at the moment, however before the application is released into the
wild I would just like to ask about a couple of security concerns with
this system.
I understand that this system is very simple, basically consisting of
a login
Brilliant! That works perfectly, thanks Dardo for your super fast
help.
[and sorry for not finding it in the cookbook myself. D'oh]
Sid.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to
Thank you for your reply.
But its not working.I dnt know where i did a mistake.
I am using two tables one is posts and users.
Login i use *'users' *table. inside i am using *'posts'* table for
displaying blog posts.
index.ctp for login screen with form fields. ( $form-create('Post',
array
Hi Everybody
Please refer good url for simple cakePHP login form
If any body wrote a code is very much appreciated.
Regards,
Dhileep
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post
://book.cakephp.org/view/172/Authentication
On Mon, Jul 20, 2009 at 4:16 PM, Dhileepen Chakravarthy
dhileepen.cake...@gmail.com wrote:
Hi Everybody
Please refer good url for simple cakePHP login form
If any body wrote a code is very much appreciated.
Regards,
Dhileep
--
--
(¨`•.•´¨) I may
Hi Dhileep,
Goto github or googlecode search for cakephp, you will find some opensource
cakephp applications,
check for the login authentication system there. it's easy.
Regards,
Isaac
On Mon, Jul 20, 2009 at 4:29 PM, jeff jeffery2k2...@gmail.com wrote:
pha ..
u never
Hi Jeff,
http://bakery.cakephp.org/articles/view/simple-form-authentication-in-1-2-x-x
I tried with this sample program but its not giving error or nothing. Simply
it gives blank page.
Other's are complecated wa of coding with Auth component and they wont give
complete.
Anyway i ll try to
Hi dhileep,
Here is where i learned authentication in cakephp
http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited
It also tells how to create groups permissions.
Thanks,
Isaac
On Mon, Jul 20, 2009 at 4:40 PM, Dhileepen Chakravarthy
Thanks Issac,
This type of url only i tried in google :)
Regards,
Dhileep
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe
$form-create('User', array('action' = 'login'))
2009/7/20 Dhileepen Chakravarthy dhileepen.cake...@gmail.com
Thank you for your reply.
But its not working.I dnt know where i did a mistake.
I am using two tables one is posts and users.
Login i use *'users' *table. inside i am using *'posts
You should have the login() logout() methods in UsersController. See here:
http://book.cakephp.org/view/172/Authentication
http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
http://www.webdevelopment2.com/cakephp-auth-component-tutorial-2/
On Mon, Jul 20, 2009 at 3:19 AM
Thanks for your reply Thiago.
But my problem was not solved.
My login page in this directory,
http://localhost/cake/posts/
named index.ctp
if i replace use your function then i got a following error.
Query: SELECT `Post`.`id`, `Post`.`username` FROM `posts` AS `Post` WHERE
`username` = 's
variables that you are using is correct
or not.
On Mon, Jul 20, 2009 at 10:37 AM, Dhileepen Chakravarthy
dhileepen.cake...@gmail.com wrote:
Thanks for your reply Thiago.
But my problem was not solved.
My login page in this directory,
http://localhost/cake/posts/
named index.ctp
if i
Hi Everybody,
*I. mysql db*
users table with id username and password field.
*II. index.ctp*
div class=login
h2Login/h2
?php echo $form-create('Post', array('action' = 'login'))?
?php echo $form-input('username');?
?php echo $form-input('password');?
?php echo $form
with id username and password field.
*II. index.ctp*
div class=login
h2Login/h2
?php echo $form-create('Post', array('action' = 'login'))?
?php echo $form-input('username');?
?php echo $form-input('password');?
?php echo $form-submit('Login');?
?php echo $form
Thanks for your reply. I am new for cakePHP. I find i did a mistake in
function validateLogin($data)
{
$user = $this-find(array('username' = $data['username'],
'password' = $data['password']), array('id', 'username'));
if(empty($user) == false)
return
Hi,
its much simpler, follow the steps on the cookbook.
http://book.cakephp.org/complete/172/Authentication
greets
Andreas
Dhileepen Chakravarthy schrieb:
Thanks for your reply. I am new for cakePHP. I find i did a mistake in
function validateLogin($data)
{
$user =
Hi Dhileepen,
I don't think you'll need to build your own query to validate.
function validateLogin($data)
{
$user = $this-find(array('username' = $data['username'],
'password' = $data['password']), array('id', 'username'));
if(empty($user) == false)
return
the user's id and name in a session variable
during the login process. Is there a simple way writing the the id and
name in a session so I can use it throughout the site.
Are you getting an header already sent errors in your login/logout?
I had some whitespace after an end tag (?) in my Users controller
variable
during the login process. Is there a simple way writing the the id and
name in a session so I can use it throughout the site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group
I am SO new to Cakephp, although I love it I am having problems with
my first app. I have been reading every possible article, book, and
blog about sessions, but I can't get it right.
I am trying to store the user's id and name in a session variable
during the login process. Is there a simple
in a session variable
during the login process. Is there a simple way writing the the id and
name in a session so I can use it throughout the site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post
Hi,
I'd like to audit the login's and logout's of the system, we're using
Auth and if the user hits logout we can update the login audit table
fine however if the session time's out we're left with a login without
a logout. Is there any smart way we can do this, obviously we can make
assumptions
Hi Miles, thanks, what you have said makes sense. Ok. thanks for the
suggestion. ;)
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To
Does anyone have any feedback or comments on this?
Much Appreciated.
G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe
Your session is local and only applies to you, so the way you are
suggesting would not work.
You would have to save the session id to the database, and do a check
to see if it changed. If it changes then destroy the session.
--~--~-~--~~~---~--~~
You received this
Hi Guys,
Does anyone know of a method to delete/destroy any sessions created by
a user when they re login? I.E. If 2 people login using the same
login, the first person should get kicked out (session destroyed)
when the second person logs in.
From looking at the Session base class
Hello,
I am trying to figure out why my login form fields are not showing
errors. From what I have read if I used cake's built in form stuff and
setup a validation array this should happen automatically if I call
validate on the model. If I dump the Model I can see that there are
errors
'];
}
return false;
}
}
CONTROLLER
class UsersController extends AppController
{
public $layout = 'login';
public $fields = array ('username', 'password');
function index()
{
print Index;
}
functionlogin()
{
// If data has been submitted
hey guys,
I'm working on a almost complete AJAX website including a AJAX Login.
After a little work I got it to work but don't think this is the
best or cake way to do it.
My Idea was to display a little element (in the Div LoginBox (see
ajax-form)) which gives me a Logout button and further
seehttp://book.cakephp.org/view/395/autoRedirect
regards,
AD
oh much thanks.
i wonder why I never saw that.
But now it works, wonderful
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
UsersController:
// this is the stripped-down version
public function login()
{
if ($user = $this-Auth-user())
{
$this-User-Login-create();
$this-User-Login-save(
array(
'Login
On Jun 21, 7:15 pm, u2ix demian.gempe...@gmail.com wrote:
UsersController:
// this is the stripped-down version
public function login()
{
if ($user = $this-Auth-user())
{
$this-User-Login-create();
$this-User-Login-save
Hello
I want to update a field in database (loginCount) after successful
login.
But I found now way where to insert this action, without to make a
redirect, as a callback or similar.
If I insert it in Users/login it will only be executed on getting the
login page, as I see?
How can I do
On Fri, Jun 19, 2009 at 11:12 AM, u2ixdemian.gempe...@gmail.com wrote:
Hello
I want to update a field in database (loginCount) after successful
login.
But I found now way where to insert this action, without to make a
redirect, as a callback or similar.
If I insert it in Users/login
Hi,
I am using the Auth component for registration and login, registration
is working perfectly, but login doesnt seem to be doing anything at
all,
I have Auth loaded in the AppController since I will be using it site
wide, however when I try to log in I just return to the login page
because
A bit hard to diagnose without seeing any code... but is your form posting
to the login action?
And also make sure cookies are enabled in your browser.
Cheers,
Adam
- Original Message -
From: uday singh.uday...@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Thursday, June 18
Hari,
It looks auth component does not use sanitize for cleaning the given
username. Password is hashed so it should not be a problem, but as I
see username is used as it is.
Is it right?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi,
It's possible create an AUTH in App and use in others app's?
For example:
App\
Forum\
Blog\
My login system is locate on App, however i wanna use in Forum and
Blog app's. It's that possible? Using just DB, model, controllers and
view of App.
Thanks e sorry about my english
Hi,
It´s possible create a Auth from one App and use in another one?
like this:
App\
Forum\
Blog\
Login system is present only in App, but Forum e Blog use it too.
Like google login. One login to many aplications: gmail, calendar...
Thanks.
Sorry about my english
: LOGIN question
From: j.andersen...@gmail.com
To: cake-php@googlegroups.com
I suggest that you turn of autoRedirect on login, as described in
http://book.cakephp.org/view/395/autoRedirect and then use something
like the following:
[code example]
if ( !$this-Auth-user() ) {
// The user
Looking at the code in the AuthComponent, I would say no!
You could make your own though :)
Enjoy,
john
On Jun 4, 2:45 pm, lakers fan lakersfa...@msn.com wrote:
Then its a two stage authentication process. is there a way where i can just
use username and email_address in the query using
You can try to determine username/email condition in your login action
and set appropriate $this-Auth-fields['username'] value before
actual login.
On Jun 4, 11:54 am, lakers fan lakersfa...@msn.com wrote:
Hello,
I have a login screen with username and password. I want to either use
my
Hello,
I have a login screen with username and password. I want to either use my
username or email address in the username field. I tried setting the Auth
fields as listed below but its not working.
$this-Auth-fields = array('username'=array('username',
'email_address'),'password
I suggest that you turn of autoRedirect on login, as described in
http://book.cakephp.org/view/395/autoRedirect and then use something
like the following:
[code example]
if ( !$this-Auth-user() ) {
// The user is not logged in, so try with the email as the
username!
$this-Auth-fields
Hello,
I have a requirement, I have two logins .. one for normal users and one
for administrators. I have two login pages separately. In my users' controller,
I have login() and adminlogin() actions. For normal users I want to use users
table to check the username and password
users
and one for administrators. I have two login pages separately. In my
users' controller, I have login() and adminlogin() actions. For normal
users I want to use users table to check the username and password,
and for administrator, i want to use users table and groups table.
groups table
/users/login for admin
http://localhost/cake/users/login for regular users.
when a user logins in say as admin, I need to get the groupid associated in
groups_users table so that I can redirect him to appropriate admin page. Same
is true for regular users..
Both admin and regular users use
this in login action then set in the beforeFitler():
$this-Auth-autoRedirect = false;
or if you want to cancel the auth redirection only for login action do:
if ($this-params['action'] == 'login' || $this-params['action'] ==
'admin_login') {
$this-Auth-autoRedirect = false;
}
dunno
Hello,
I m new to cakephp.. I want to check in every page whether a user has
logged in or not.. If not I want to redirect him to login page. Is there a way
to do it in a common place like app_controller?
Thanks,
Bharani
in the beforeFilter() function
- set which pages you are allowed anonymous access to using
$this-Auth-allow('index', 'posts', 'etc', 'etc); (in beforeFilter())
- add login() and logout() functions to your controller(s) you wish to do
auth...
the cookbook has rather detailed explanations
bryan
On Tue
it is redirected to somewhere else.. and $this-Auth-user() returns true.
I would like to know what happens when a form is submitted. Does it go to
login() in user_controller.php again?.
Thanks,
Bharani
Date: Tue, 19 May 2009 07:40:42 -0700
Subject: Re: Login Redirect Problem
From
Oh sorry I noticed you do manual redirect. Try to insert address
manually.
On 20 май, 17:44, Sergei yatse...@gmail.com wrote:
loginRedirect is NOT the address you will be send after login. It's
the address wheere user willbe redirected if he requested protected
resource.
Do a manual
loginRedirect is NOT the address you will be send after login. It's
the address wheere user willbe redirected if he requested protected
resource.
Do a manual redirect() in login() action.
On 19 май, 18:33, lakers fan lakersfa...@msn.com wrote:
Hello,
I have userid and password fields
Hello,
I have userid and password fields and a login button. When I press login
button, if the userid and password are correct I want the page redirected to my
accounts page.
So in app_controller.php, in beforeFilter() I have the following code.
$this-Auth-loginRedirect = '/users
Running CakePHP site with Auth.
When I visit /users/login or /users/logout, I end up at /users/login.
All fine so far. When I try to login, the login fails, and the SQL
log shows;
SELECT `User`.`id`, `User`.`email`, `User`.`password` FROM `users` AS
`User` WHERE `User`.`id` IS NULL LIMIT 1
What have you written in the before render method in the app
controller?
John
On May 19, 2:14 pm, Jules fattyju...@gmail.com wrote:
Running CakePHP site with Auth.
When I visit /users/login or /users/logout, I end up at /users/login.
All fine so far. When I try to login, the login fails
function beforeRender() {
// make logged-in user's details available to ALL pages
if($this-Session-check('Auth.User.id')) {
$user = $this-Auth-User();
$this-set('logged_in_user', $user['User']);
}
}
Sorry, in the before filter method :)
John
On May 19, 2:58 pm, Jules fattyju...@gmail.com wrote:
function beforeRender() {
// make logged-in user's details available to ALL pages
if($this-Session-check('Auth.User.id')) {
$user = $this-Auth-User();
What happens when you submit? Stays there? Redirects somewhere else?
Throws errors (if so, which ones)?
In the code you have provided, does $this-Auth-user() evaluate to
true?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Found it, thanks.
I had some custom logout code in AppController::beforeFilter() which
was causing the problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to
Hi sorry for making my question so obscure I had a home.ctp which
should contain a login form ... Right now i just redirected the index
to login ... is it posssible by making login.ctp as a element and
including it in home.ctp ...?
On May 9, 7:47 pm, brian bally.z...@gmail.com wrote:
What
That's a reasonable approach to take; yes.
On Tue, May 12, 2009 at 10:40 AM, dnoop dan...@gmail.com wrote:
Hi sorry for making my question so obscure I had a home.ctp which
should contain a login form ... Right now i just redirected the index
to login ... is it posssible by making
What are you trying to do? Include the form as an element? Redirect to
the login form?
On Sat, May 9, 2009 at 1:04 AM, dnoop dan...@gmail.com wrote:
Hi,
I am a newbie here and i was doing one user profile
system .. seems almost everything is working fine .. in my but when i
went
Hi,
I am a newbie here and i was doing one user profile
system .. seems almost everything is working fine .. in my but when i
went to apply it to my design i just need a login form only ...no
need of the original index page which shows list of users .. what
should i do
On Fri, May 1, 2009 at 7:16 AM, j0n4s.h4rtm...@googlemail.com
j0n4s.h4rtm...@googlemail.com wrote:
Hello Brian,
about PLESK:
1. Your DOCUMENT ROOT will be something like /var/www/domains/
domain.tld/httpdocs you will need to change that via ssh for instance.
You can do that multiple ways
);
$this-Auth-deny('*');
$this-Auth-allow('login');
} else {
$this-Auth-allow('*');
}
} else {
$this-Auth-allow
') {
Configure::write('debug', 2);
$this-Auth-deny('*');
$this-Auth-allow('login');
} else {
$this-Auth-allow('*');
}
} else
') {
Configure::write('debug', 2);
$this-Auth-deny('*');
$this-Auth-allow('login');
} else {
$this-Auth-allow('*');
}
} else
('*');
$this-Auth-allow('login');
} else {
$this-Auth-allow('*');
}
} else {
$this-Auth-allow('*');
}
}
}
?
King regards
Jonas
Hello all ! ! !
I'm new to CakePHP and I already have create a login system based on
Auth Component. All are fine with that component, but the problem that
I have is that if the user logou the system then he can't see any
page. The Auth redirects automatic to login form. What can I do
to without authentication.
http://book.cakephp.org/view/247/AuthComponent-Methods
for more info
Russ
On Apr 30, 5:01 am, DatacenterHellas merianosni...@gmail.com wrote:
Hello all ! ! !
I'm new to CakePHP and I already have create a login system based on
Auth Component. All are fine
();
i.e.:
//Users Controller
function beforeFilter()
{
parent::beforeFilter();
$this-Auth-allow('register', 'login', 'logout');
}
On Apr 30, 10:33 am, rgreenphotodesign rgr...@rgreenphotography.com
wrote:
You need this in all your controllers...
code
function beforeFilter
merianosni...@gmail.com wrote:
Hello all ! ! !
I'm new to CakePHP and I already have create a login system based on
Auth Component. All are fine with that component, but the problem that
I have is that if the user logou the system then he can't see any
page. The Auth redirects automatic to login
somewhere that 'login' cannot be in allow()
array (the auth logic takes care of it) because it can make Auth behave oddly.
DatacenterHellas pisze:
Hello all ! ! !
I'm new to CakePHP and I already have create a login system based on
Auth Component. All are fine with that component
('*');
$this-Auth-allow('login');
} else {
$this-Auth-allow('*');
}
} else {
$this-Auth-allow('*');
}
}
}
?
You should never include 'login
Auth does not provide that facility!
You have to do the counting yourself!
But it would be better to inform the user by email, that a login has
failed X times, so in the case that the failed attempts was not
performed by the owner, the owner can take action (whatever that may
be!).
Enjoy,
John
Hi,
maybe you can use this component:
http://bakery.cakephp.org/articles/view/brute-force-protection
Greets,
Michael
On 16 Apr., 13:39, ShyamT ghanshyamt...@gmail.com wrote:
I want to give limitation for login attempt user authentication.
Suppose user fail to login in continuous 3 attempts
I want to give limitation for login attempt user authentication.
Suppose user fail to login in continuous 3 attempts, his account
should be locked, and he should not access that account till it
unlock.
Is there any facility in auth component to count login attempt and
check it.
Please help me
Im not sure what exactly do you mean, but i think i had a semilar
problem. I need a login page where the email adress is checked in a
first step. if the adress exists in the user table, promt for a
password and log the user in. if not, show a register form.
for this i made a lot of handwork
Hi friends,
Is there any possibility to create multiple login
page using Auth.I am new to cake php.Plz reply
Regards,
a href=http://www.leafgrafica.com;C.Vijay vinoth/a
cvijayvin...@gmail.com
--~--~-~--~~~---~--~~
You received this message
...@gmail.com
2009/4/9 Jorge Horacio Cué Cantú jorge@gmail.com:
Hello,
Set
$this-Auth-redirect = false
in AppController::beforeFilter().
The the login() action will be called after a successful login.
Thanks, that's it (sort of). The var is actually
$this-Auth-autoRedirect
::beforeFilter();
$this-Auth-allowedActions = array('eula', 'register',
'reset_password');
}
public function login()
{
if (!empty($this-data))
{
if ($this-Auth-login($this-data))
{
$user = $this-Auth-user
OK, it looks like one can't override login() with AuthComponent in
place. I was sure I could, and it doesn't make sense to me that I
can't. If someone knows otherwise, please advise.
So, I tried putting my code in isAuthorized().
AppController:
function beforeFilter()
{
$this-Auth
Have you considered a separate column in your users table of
accepted_eula or eula_version_accepted if you want to track which
version of the EULA they have accepted?
It would be easy then to force users to re-accept if it changes and
you do not have to lose the last_login data if you wish to
Actually, yes, I did consider that and I think I will do it that way.
But that still leaves with this problem: how to check this field after
a successful login?
On Thu, Apr 9, 2009 at 11:48 AM, Angry Coder angryco...@gmail.com wrote:
Have you considered a separate column in your users table
Hello,
Set
$this-Auth-redirect = false
in AppController::beforeFilter().
The the login() action will be called after a successful login.
Regards.
2009/4/9 brian bally.z...@gmail.com
Actually, yes, I did consider that and I think I will do it that way.
But that still leaves
2009/4/9 Jorge Horacio Cué Cantú jorge@gmail.com:
Hello,
Set
$this-Auth-redirect = false
in AppController::beforeFilter().
The the login() action will be called after a successful login.
Thanks, that's it (sort of). The var is actually $this-Auth-autoRedirect.
So
Your wellcome, sorry for the small mistake.
2009/4/9 brian bally.z...@gmail.com
2009/4/9 Jorge Horacio Cué Cantú jorge@gmail.com:
Hello,
Set
$this-Auth-redirect = false
in AppController::beforeFilter().
The the login() action will be called after a successful login
801 - 900 of 1345 matches
Mail list logo