简体   繁体   English

CakeDC用户插件:如何安装CakeDC用户插件,我已阅读文档

[英]CakeDC users plugin: How can i install cakedc users plugin, i have read the documentation

https://github.com/cakedc/users/tree/2.0

After extracting the cakedc users plugin i copied it to app/Plugin folder. 解压缩cakedc用户插件后,我将其复制到app / Plugin文件夹。

I ran this command and got error: 我运行了此命令并收到错误消息:

cake migration all -plugin users

Why is this error? 为什么会出现此错误? It's cakephp-2.0 and after extracting the users plugin, i see the convention of the folders are like cakehp-1.3 它是cakephp-2.0,解压缩了用户插件后,我看到文件夹的约定就像cakehp-1.3

Error: Shell class MigrationShell could not be found.
#0 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('migration')
#1 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /var/www/cakephp/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
#3 {main}

How can i install this users plugin and use it ? 如何安装和使用此用户插件?

In case someone will search this, here's how to use Migrations and Users plugins from CakeDC with CakePHP 2.x: 万一有人会搜索,这是在CakePHP 2.x中使用来自CakeDC的Migrations和Users插件的方法:

1) Make sure you downloaded correct branches (2.0) from git. 1)确保您从git下载了正确的分支(2.0)。 It can be checked by camel-cased directory names of plugins 可以通过驼峰式插件目录名称进行检查

2) Place them inside app/Plugins/ with corresponding names: Migrations and Users 2)将它们放入具有相应名称的app / Plugins /中: MigrationsUsers

3) make sure you loaded plugins by including them in app/Config/bootstrap.php like: CakePlugin::load('Migrations'); 3)确保通过在app / Config / bootstrap.php中包含插件来加载插件,例如: CakePlugin::load('Migrations');

4) to import Users plugins scheme go to app/ and run command ./Console/cake Migrations.migration all --plugin Users 4)要导入Users插件方案,请转到app /并运行命令./Console/cake Migrations.migration all --plugin Users

This sequence worked for me. 这个顺序对我有用。 Hope it will help someone else. 希望它会帮助别人。 If there are any improvements to this - all are welcome. 如果对此有任何改进-都欢迎。

  1. Have you installed CakeDC's Migrations plugin ? 您是否安装了CakeDC的Migrations插件
  2. Have you loaded the plugins ? 您是否已加载插件

Syntax is a bit wrong on the docs. 语法在文档上有点错误。 For migration, (first install the CakeDC Migrations plugin) you should run .. 对于迁移,(首先安装CakeDC Migrations插件)应运行..

Console/cake Migrations.migration run all --plugin Users

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CakeDC用户插件-我无法发送电子邮件 - CakeDC Users Plugin - I Can't Send Emails 当我使用CakeDC /用户插件时不显示用户名 - Don't display the username when I user CakeDC/users plugin CakeDC用户插件-如何在注册表单中添加详细信息字段(即first_name,company) - CakeDC users plugin - how to add details field(i.e - first_name, company) in to registration form Cakephp:CakeDC用户插件并保存另一个表 - Cakephp: CakeDC Users plugin and save another table cakeDC用户插件被注册黑了 - cakeDC users plugin gets blackholed with register 扩展CakeDC用户插件以与Opauth或OpenID一起使用 - Extending CakeDC users plugin for use with Opauth or OpenID 如何在Cakephp 3中扩展Cakedc用户插件以使用自己的表 - How to extend Cakedc Users plugin to use own table in Cakephp 3 我如何获取cakephpcakedc用户中的当前登录用户 - how do i get the current logged in users in cakephp cakedc users CakePHP-设置与插件中的文件夹相关的viewPath(CakeDC用户插件) - CakePHP - Set viewPath in relation to a folder within a Plugin (CakeDC Users Plugin) CakePHP-2.0,如何设置与CakeDC-Users用户模型和Post模型之间的模型关系? - CakePHP-2.0, How can i set model relation with CakeDC-Users User model with Post model?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM