oh,i'm really sorry,

Here's my login form:

<?php
    $session->flash('auth');
    echo $form->create('User', array('action' => 'login'));
    echo $form->input('username');
    echo $form->input('password');
    echo $form->end('Login');

?>

i don't have Auth settings in beforeFilter since i'm using a table
with nothing but username  and password fields.
My loging action is just this (i'm just trying to get it work,
acording to cookbook this is enought):

   function login() {
           }


Pablo E. Terradillos




On Thu, Mar 4, 2010 at 2:23 PM, John Andersen <[email protected]> wrote:
> Good that you are looking into the issue using the CakePHP book!
> Now, so that we better may be able to help you, please show the code
> for the login form, the code for your Auth settings in the
> beforeFilter method, and the login method itself.
>
> Enjoy,
>   John
>
> On Mar 4, 2:22 pm, Pablo Terradillos <[email protected]> wrote:
>> Hi all, i'm a really noob with cakephp and i'm having some problems
>> that are supposed to be by cake by default but for some kind of
>> mistery (or stupidity) i can't get it. i'm using cake 1.3.
>>
>> The problem is with an user registration form and the login using the
>> auth component.
>>
>> I have two tables, "clients" with a user_id field (and some other
>> stuff) and "users" (with id, username and password fields)
>>
>> My models:
>>
>>   class User extends AppModel {
>>           var $name = 'User';
>>           var $hasOne = 'Client';
>>
>>         }
>>
>>     class Client extends appModel {
>>         var $name = 'Client';
>>         var $belongsTo = 'User';
>>     }
>>
>> According to cookbook: "When posting information to an action via a
>> form, the Auth component automatically hashes the contents of your
>> password input field if you also have data in the username field"
>> (http://book.cakephp.org/view/1253/Troubleshooting-Auth-Problems)
>>
>> Well, i have a registration form, with fields for username and
>> password (and the data that is stored into "clients") but it doesn't
>> hash anything :(
>> Also, i tryied to hash it "manually" using
>> $this->data['User']['password'] =
>> Security::hash($this->data['User']['password']);
>>
>> But then, when i tryied to use the auth component (following 
>> this:http://book.cakephp.org/view/1250/Authentication)  and login...
>> nothing happens... no errors, no warnings... nothing... i only get the
>> login and password.
>>
>> I have an username with his password hashed with SHA1. I also tryied
>> removing the security.salt stuff from core.php but the problem is
>> still there...
>>
>> Hope you can help me,
>>
>> Thanks!
>>
>> Pablo E. Terradillos
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" 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
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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