hi all,
its work;
i changed the form fields to username and password. could it be possible
that may not use usr and pwd?
public $components = array(
'Auth'=> array(
'authenticate' => array(
'Form' => array(
'fields' => array('username' => 'User.username',
'password' => 'User.password')
)
)
)
);
________________________________
Von: Serkan Sipahi <[email protected]>
An: "[email protected]" <[email protected]>
Gesendet: 13:47 Mittwoch, 9.November 2011
Betreff: Re: Problem Auth Component | CakePHP 2.0.2
hi,
that has not helped me(What if you try $this->Auth->login -- small 'l' in
login?) ;( i dont know what i do wrong!! Debug is "2" and that give me no
error!
________________________________
Von: Davor Ilic <[email protected]>
An: [email protected]
Gesendet: 18:35 Dienstag, 8.November 2011
Betreff: Re: Problem Auth Component | CakePHP 2.0.2
does this helped you Serkan?
2011/11/7 Jeremy Burns | Class Outfit <[email protected]>
What if you try $this->Auth->login -- small 'l' in login?
>
>
>Jeremy BurnsClass Outfit
>
>http://www.classoutfit.com
>
>
>On 7 Nov 2011, at 18:55, Serkan Sipahi wrote:
>
>
>>
>>hi again,
>>
>>
>>
>>the password is hashed in the database and it still does not work! please
>>help me cake community....
>>
>>
>>
>>________________________________
>>Von: Serkan Sipahi <[email protected]>
>>An: "[email protected]" <[email protected]>
>>Gesendet: 15:08 Sonntag, 6.November 2011
>>Betreff: Re: Problem Auth Component | CakePHP 2.0.2
>>
>>
>>hi,
>>
>>
>>wft! why is this so difficult? I'm not stupid!!
>>
>>
>>
>>
>>________________________________
>>Von: Serkan Sipahi <[email protected]>
>>An: "[email protected]" <[email protected]>
>>Gesendet: 18:09 Samstag, 5.November 2011
>>Betreff: Re: Problem Auth Component | CakePHP 2.0.2
>>
>>
>>hi,
>>
>>
>>thank you for your note. But it still doesnt work.
>>
>>
>>'fields' => array('username' => 'usr', 'password' => 'pwd') ...doesnt work as
>>well !!!
>>'fields' => array('username' => 'User.usr', 'password' => 'User.pwd')
>>...doesnt work as well !!!
>>
>>
>>
>>Controller:
>>
>>
>>
>>class PricerobotStoreEnginesController extends AppController {
>>
>> public $components = array(
>> 'Auth'=> array(
>> 'authenticate' => array(
>>
'Form' => array(
>> 'fields' => array('username' => 'usr', 'password' =>
>>'pwd')
>> //'fields' => array('username' => 'User.usr',
>>'password' => 'User.pwd') ...doesnt work as well !!!
>>
>> )
>> )
>> )
>> );
>>}
>>
>>
>>class UsersController extends AppController {
>>
>> public $components = array('Auth','Security');
>>
>> public function login() {
>>
>> if
($this->request->is('post'))
{
>> if ($this->Auth->Login()) {
>> $this->redirect(array('controller' =>
>>'PricerobotStoreEngines', 'action' => 'index'));
>> } else {
>> $this->Session->setFlash(__('Username or password is
>>incorrect'));
>> $this->redirect(array('controller' => 'users', 'action'
>>=> 'login'));
>>
}
>> }
>>
>> }
>> public function logout() {
>> $this->redirect($this->Auth->logout());
>> }
>>}
>>
>>
>>
>>View:
>>
>>
>>
>>echo $this->Form->create();
>>echo $this->Form->input('usr'); //text
>>echo $this->Form->password('pwd'); //password
>>echo $this->Form->end('Login');
>>
>>
>>Database:
>>Table: users
>>fields: usr, pwd
>>
>>
>>
>>
>>________________________________
>>Von: Ryan Schmidt <[email protected]>
>>An: [email protected]
>>Gesendet: 12:40 Samstag, 5.November 2011
>>Betreff: Re: Problem Auth Component | CakePHP 2.0.2
>>
>>
>>On Nov 5, 2011, at 03:46, Serkan Sipahi wrote:
>>
>>> I really need help. What is my cake mistake?
>>
>>I assume you need to do what it says in the documentation, and inform CakePHP
>>that your username is stored in the field "usr" and the password is in the
>>field "pwd"; see the part under "To configure different fields for user in
>>$components array":
>>
>>http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers
>>
>>
>>--
>>Our newest site for the community: CakePHP Video Tutorials
>>http://tv.cakephp.org
>>Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>others with their CakePHP related questions.
>>
>>
>>To unsubscribe from this group, send email to
>>[email protected] For more options, visit this group at
>>http://groups.google.com/group/cake-php
>>
>>
>>
--
>>Our newest site for the community: CakePHP Video Tutorials
>>http://tv.cakephp.org
>>Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>others with their CakePHP related questions.
>>
>>
>>To unsubscribe from this group, send email to
>>[email protected] For more options, visit this group at
>>http://groups.google.com/group/cake-php
>>
>>
>>
>>
>>
>>
>>
--
>>Our newest site for the community: CakePHP Video Tutorials
>>http://tv.cakephp.org
>>Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>others with their CakePHP related questions.
>>
>>
>>To unsubscribe from this group, send email to
>>[email protected] For more options, visit this group at
>>http://groups.google.com/group/cake-php
>>
>
>--
>Our newest site for the community: CakePHP Video Tutorials
>http://tv.cakephp.org
>Check out the new CakePHP Questions site http://ask.cakephp.org and help
>others with their CakePHP related questions.
>
>
>To unsubscribe from this group, send email to
>[email protected] For more options, visit this group at
>http://groups.google.com/group/cake-php
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php