notice you have $this->set('auth_msg', $this->othAuth-
>getMsg($auth_num));
and you don't print it in the view, it has some login hints for the
user. like user/login incorrect etc..

On Apr 23, 7:07 pm, Stacey <[EMAIL PROTECTED]> wrote:
> ok, i'm stupid. i am new to cake, and thought that othAuth somehow
> handled the field validation. after reading some posts, i realized i
> need to do it myself. got it working...thanks.
>
> On Apr 23, 12:30 pm, Stacey <[EMAIL PROTECTED]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to