cakedc

Cakedc.users => always redirect to homepage

混江龙づ霸主 提交于 2020-07-30 07:43:11
问题 I'm using the plugins "CakeDC/Users" on a brain new Cakephp installation. I've got two controllers : PagesController.php, CardsController.php. Pages has 1 action (Beta, it's the homepage), and Cards two actions (index, and single). Here is the setup in the bootstrap : Configure::write('Users.config', ['users']); Plugin::load('CakeDC/Users', ['routes' => true, 'bootstrap' => true]); And the configuration of the plugin in config/users.php : return [ 'Users' => [ 'Email' => [ 'validate' => false

Error PDO Exception SQLSTATE[42000] when using CakeDC Users plugin

纵然是瞬间 提交于 2019-12-25 03:43:20
问题 Iam using cakephp 2.2.1 and trying to use the cakedc users plugin, when I try to create a user I get the following error, can anyone give some tips or advice to resolve this error - I have loaded all tables using the migrations plugin. Thanks in advance :). 2013-04-07 06:31:33 Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

CakeDC users plugin - how to add details field(i.e - first_name, company) in to registration form

风格不统一 提交于 2019-12-25 01:55:23
问题 I have installed the cakeDC Users plugin and extend/override users controller and model as they described in to the Readme. Seems everything working. But, I want to modify the registration form and plugin to add fields - first_name, company etc. and enable user account activation by admin user. So, my question is, how do I add custom fields in to the registration form disable email verification disable activating user account by default I am new to cakePHP and there is not so much

cakephp basic help to use cakedc search plugin

倾然丶 夕夏残阳落幕 提交于 2019-12-23 05:24:04
问题 I'm using cakephp 2.1 and cakedc search plugin. The thing is I can't glue it together. Also got: Notice (8): Indirect modification of overloaded property ProjectsController::$paginate has no effect [APP\Controller\ProjectsController.php, line 48] Followed cakedc tutorial but something's missing! Simple search just won't filter anything. I want to filter by name field. On my projects model public $actsAs = array('Search.Searchable'); var $name = 'Project'; public $filterArgs = array( array(

CakeDC Users login with username

梦想与她 提交于 2019-12-23 03:24:07
问题 The default login process requires e-mail, not username. I've added this to AppController.php on beforeFilter() , which is also mentioned on CakePHP's Docs Authentication: $this->Auth->fields = array( 'username' => 'username', 'password' => 'password' ); But somehow it does not allow users to login with their usernames. Any ideas on how I can change that? AppController App::uses('Controller', 'Controller'); class AppController extends Controller { var $components = array( 'Session',

Strict (2048): Declaration of CsvImportBehavior::setup() should be compatible with ModelBehavior

≡放荡痞女 提交于 2019-12-22 17:48:03
问题 I am getting the following error: Strict (2048): Declaration of CsvImportBehavior::setup() should be compatible with ModelBehavior::setup(Model $model, $config = Array) [APP\Plugin\Utils\Model\Behavior\CsvImportBehavior.php, line 20] I followed the tutorial on this site: http://www.pronique.com/blog/enable-csv-import-all-controllers-models-cakephp-2 When I import my CSV file, it gives the following flash message: Successfully imported 0 records from Book1.csv I don't understand why its not

How can we run I write Cakephp Migrations for database connection type?

£可爱£侵袭症+ 提交于 2019-12-12 02:02:33
问题 I am using CakeDc Migrations plugin for database migration. my application is using two databases. so configured it in database.php. I have written many migrations which co-ordinate with the database1(default connection ) and its working fine. Now I want to write one migration which co-ordinate with database2(I want to run these queries only on database2 ) . how Can I differentiate? at what level ? Thank you. 回答1: Just read the help text and documentation. --connection, -c Overrides the

how to use cakedc/search plugin for searching across 3 different tables with 1 search bar?

大城市里の小女人 提交于 2019-12-11 19:39:29
问题 I am using CakePHP2.4 and the search plugin https://github.com/CakeDC/search I have the following Employee hasOne EmployeeProfile Employee hasMany Qualification So I have a single search bar. the search bar will search using LIKE through the following fields Employee.name EmployeeProfile.email Qualification.title how do I configure the model Employee->filterArgs for this search? This is a cross-posting of the original issue here 回答1: The documentation includes an example. 'username' => array(

CakeDc/users how to work with permissions?

孤人 提交于 2019-12-11 07:07:55
问题 I installed CakeDC/users run migration, created the super user, copied the users.php to config/ directory. And now in my website all pages are redirecting to login page. And i can't change this thing, cause i not well understand how permissions work. My needs are to allow all pages on site, and block access only for one page with personal data for the user loggedin. Any help, suggest readings, examples are welcome, BIG thanks! 回答1: You will need to allow all actions in the beforeFilter of

CakeDC Users login with username

为君一笑 提交于 2019-12-08 13:47:30
The default login process requires e-mail, not username. I've added this to AppController.php on beforeFilter() , which is also mentioned on CakePHP's Docs Authentication : $this->Auth->fields = array( 'username' => 'username', 'password' => 'password' ); But somehow it does not allow users to login with their usernames. Any ideas on how I can change that? AppController App::uses('Controller', 'Controller'); class AppController extends Controller { var $components = array( 'Session', 'RequestHandler', 'Security' ); var $helpers = array('Form', 'Html', 'Session', 'Js'); public function