2
如何用CakeDC的用戶插件實現MilesJ的論壇插件?MilesJ的論壇插件和CakeDC的用戶插件
- CakeDC用戶插件工作正常。
- 的MilesJ論壇插件使用(不使用插件)
在http://milesj.me/code/cakephp/forum#user-setup落實論壇插件的說明與先前的自寫用戶系統正常工作。但它不會預期用戶系統使用插件。
這是典型的 「APPUSER」(名稱由CakeDC強制):
App::uses('User', 'Users.Model'); class AppUser extends User { public $useTable = 'users'; public $hasOne = array('Forum.Profile'); public $hasMany = array('Forum.Access','Forum.Moderator')); }
我不斷收到以下錯誤...
Warning (512): Model "User" is not associated with model "Profile" [CORE\Cake\Model\Behavior\ContainableBehavior.php, line 339] Warning (512): Model "User" is not associated with model "Access" [CORE\Cake\Model\Behavior\ContainableBehavior.php, line 339] Warning (512): Model "User" is not associated with model "Profile" [CORE\Cake\Model\Behavior\ContainableBehavior.php, line 339] Warning (512): Model "User" is not associated with model "Access" [CORE\Cake\Model\Behavior\ContainableBehavior.php, line 339]
我怎麼能相信有論壇和用戶插件之間的適當關係?