hi all,
cake version: v1.1.13.4450
i've been trying to implement othAuth, and seem to be having a problem
with login errors. it seems to be installed properly...if i login with
the correct password, it lets me access the pages. but, it is not
returning any errors if the login is incorrect or if the fields are
not filled in properly. ie. missing username, etc.
here is my login.thtml:
<h1>Log In:</h1>
<form action="<?php echo $html->url('/users/login'); ?>"
method="post">
<div class="required">
<label for="user_username">Username</label>
<?php echo $html->input('User/username', array('id' =>
'user_username', 'size' => '40')) ?>
<?php echo $html->tagErrorMsg('User/username', 'Please enter your
username') ?>
</div>
<div class="required">
<label for="user_password">Password</label>
<?php echo $html->input('User/passwd', array('id' =>
'user_passwd', 'size' => '40', 'type'=>"password")) ?>
<?php echo $html->tagErrorMsg('User/passwd', 'Please enter your
password!') ?>
</div>
<?php echo $html->checkbox("User/cookie");?>
<div class="submit"><input type="submit" value="Login" /></div>
</form>
here is my users_controller:
<?php
class UsersController extends AppController
{
function login()
{
if(isset($this->params['data']))
{
$auth_num = $this->othAuth->login($this->params['data']
['User']);
$this->set('auth_msg', $this->othAuth->getMsg($auth_num));
}
}
function logout()
{
$this->othAuth->logout();
$this->flash('You are now logged out!','/users/login');
}
function noaccess()
{
$this->flash("You don't have permissions to access this
page.",'/admin/login');
}
function index()
{
$username = $this->Session->read('user');
if ($username)
{
$results = $this->User->findByUsername($username);
$this->set('User', $results['User']);
$this->set('last_login', $this->Session->read('last_login'));
} else {
$this->redirect('/users/login');
}
}
}
?>
if i put in an incorrect username, or i even leave one of the fields
blank, it just keeps returning to the login page without any
errors...so it's hard to tell what's going on.
any suggestions on where my problem lies would be greatly appreciated.
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---