Hi togehter,
I've installed the plugin authake - it's a plugin for user management.
Now I want to connect one table of my aplication with the user table
of authake. The name of the table in authake is authake_users. In my
table "providers" I made a new field user_id (this is the foreign key
of id from authake_users).
In my provider modell I tried differents things:
class Provider extends AppModel {
var $name = 'Provider';
var $belongsTo = array(
'Authake.User' => array(
'className' => 'Authake.Users')
);
In my controller I tried different things:
class ProvidersController extends AppController {
var $name = 'Providers';
var $uses = array('Authake.User', 'Provider');
var $helpers = array('Html','Form');
function index() {
$conditions = array();
$providers = $this->Provider->find('all',array(
'conditions' => $conditions)
);
This is the model from Authake user:
class User extends AuthakeAppModel {
var $name = 'User';
var $useTable = "authake_users";
In Cakes Changeset 6001 they wrote it should go this way. But it will
give a wrong SQL:
SELECT `Provider`.`id`, `Provider`.`users_id`, `Provider`.`company`,
`Authake`.`User`.`id`, `Authake`.`User`.`login`,
`Authake`.`User`.`password`, `Authake`.`User`.`email`,
`Authake`.`User`.`emailcheckcode`,
`Authake`.`User`.`passwordchangecode`, `Authake`.`User`.`disable`,
`Authake`.`User`.`expire_account`, `Authake`.`User`.`created`,
`Authake`.`User`.`updated` FROM `providers` AS `Provider` LEFT JOIN
`authake_users` AS `Authake`.`User` ON (`Provider`.`authake`.user_id =
`Authake`.`User`.id) WHERE 1 = 1
Authake is working perfect on my application.
I tried it also with App::import('Model', 'Authake.User');
But this will nether search for the table authake_users - it search
for table user?!
Have anybody an idea for me?
Regards Thomas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---