-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been trying to get the OthAuth component to work with the 1.2
beta of cake released just after the new year.

In my users_controller.php file, I have the following function:


24         function login()
     25         {

26
$this->pageTitle = 'Log In';

27
$this->set('auth_msg', '');

28
$this->set('auth_return', '0');

29
$this->set('param', $this->params);

30
$this->set('stuff', $this->data);

31
if (!empty($this->data['User']))

32
{

33
$auth_num = $this->othAuth->login($this->params['data']['User']);

34
$this->set('auth_return', $auth_num);

35
$this->set('auth_msg', $this->othAuth->getMsg($auth_num));

36
}
     37         }

I included the $this->params and $this->data variables in order to
debug the code, and assure that they exist.

When I hit the submit button on my login form, the page updates with
the following data and params arrays.

Params: Array( [pass] => Array ( ) [named] =>
Array ( ) [controller] => users [action] => login
[plugin] => [form] => Array ( ) [data] => Array
( [User] => Array (
[username] => root [password] => 123456
) ) [url] => Array ( [url] =>
users/login ) [bare] => 0 [webservices] => )

Data: Array( [User] => Array ( [username] =>
root [password] => 123456 ))

In the OthAuth Component, the basic login function reads as follows,
including the code I inserted to debug it.
    212     function login($ap =
1,$order ='asc') // username,password,group
    213    {
    214
    215
if(!$this->_checkLoginAttempts())
    216        {

217
return -3; // too many login attempts
    218        }
    219
    220        $params = null;
    221
    222
if(!empty($this->data))

223
return 2;
    224
if(!empty($this->params))

225
return 2;
    226
if(!empty($this->controller->data))

227
return 2;
    228
if(!empty($this->controller->data[$this->user_model]))
    229        {

230
$params[$this->user_model] = $this->controller->data[$thi

231
return 1;
    232        }
    233
//return $this->_login($params);
    234    }
yet no matter what, it still outputs the a 0 in $auth_return, showing
that the data, params, and controller->data are empty? Does anyone
know what could cause this?

- --
In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)
- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s+: a19 C++++ UL++ P L++
!E W++ N(-) o? K? w(+) O? M-- V?
PS+ PE Y- PGP- t+ 5? X- R tv--
b++ Di D+ G+ e h! r y-
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFHjnSX07DvTednSKQRAn+1AJwN9pMJ32G5IpmZC7r2pV+01tgE4QCfSIWM
7rSkB8S0A8eYW+Lb+IAPoUs=
=4GfB
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
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