Sunday, May 31, 2015

Re: Login/Registration

I think you have to read the CakePHP docs then you will definitely get all the answers.

On Monday, June 1, 2015 at 3:09:15 AM UTC+5:30, sakshi bhalla wrote:
All,

I am new to Cake PHP. I am developing a website and struggling to complete the initial login/registration page.
Not sure, how should i link between html/css pages with my controller and where should i authenticate user with my database.
Can anyone share the general structure for login/registration for web app using cake php.


Thanks
Sakshi

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: Unusual Table name/ Convention Naming issue

Please look after your controller's class name. If you changed your controller's name to "MyCallDatas1sController" then you also have to change the class name in the controller same as the file name. I think that should work.

On Monday, June 1, 2015 at 3:09:13 AM UTC+5:30, Troy White wrote:
Hello I am having a naming convention problem that I would normally just rename the table. However, that is not an option. 

Background info:Table name is myCallDatas1

I am trying to create a controller for this table. I went to http://inflector.cakephp.org/ and it returned myCallDatas1s. I have tried to use this as a controller(MyCallDatas1sController) name and I get the following error message: Error: Create the class MyCallDatas1sController.php. This table can not be renamed(it is attached to mission critical appliances) is there a work around to fix this issue?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: CakePHP project copy to Ubuntu 14.04 LAMP based VPS

try to add /webroot to your apache config maybe ?


Andras


On May 23, 2015, at 11:55 AM, Ádám Domaföldi <domafoldi.adam@gmail.com> wrote:

Hi!

I spent hours to solve this problem. I've been using CakePHP for two years and I've never had this kind of problem before. I installed the CakePHP3 to my loacalhost folder on my windows dev computer. I use wamp in order to get a simple lamp environment. On my windows cakephp3 works like charm but when I copied to my Ubuntu VPS with LAMP I see only a blank page. CakePHP 2 is working on my VPS without problem. Other CMS like wordpress, joomla are working too without any problem. I checked the mod rewrite settings and everything is fine.

Please check my TLD:

piheno.com

Could you please give me some advice? 


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

cakephp best practice

Hi there,

I'm new to web development and I've been studying cakephp and I have this situation where I want to know the best practice.

Imagine a user creating a new Customer in the application, in the form he has to choose the customer's sales group, and this table has so many records, that's using a drop down list isn't a viable option.

I was thinking in the user press a button, then open a modal window. This new window would have a grid, with search options (for filtering the data) and the user would choose one, and go back to the original form, bringing back the sales group selected by the user.

What's the name of this technique, and is it a good option? How to do this in cakephp?

Best regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Search a foreign key - crud

Hi there,

I'm new to web development and I've been studying cakephp and I have this situation where I want to know the best practice.

Imagine a user creating a new Customer in the application, in the form he has to choose the customer's sales group, and this table has so many records, that's using a drop down list isn't a viable option.

I was thinking in the user press a button, then open a modal window. This new window would have a grid, with search options (for filtering the data) and the user would choose one, and go back to the original form, bringing back the sales group selected by the user.

What's the name of this technique, and is it a good option? How to do this in cakephp?

Best regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Moving cakephp 2.5 to a shared server

http://naijatelegram.com/oscar/


Above is the link to my cakephp web application, i do not know why the error on that page is showing, it was not showing while i was on thelocal environment .

Your help would be apppreciated.

Thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Online Job Portal System Use Case Diagrams

 want to create Job website with this actors The user is not registered(don't have a Account) and his children job seeker(have a Account),employer(have a Account)In addition to administrator.I do not know if what I did is correct or not. Any help?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

"Companies using CakePHP"

Hello there,

I've launched not long ago a new website using cakephp 3. I was just wondering if it was possible to make it appear in the "Companies using CakePHP" section of cakephp.org.
Is there a form / email address to apply for it?

Thx!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

cakephp 3.0- login and registration using custom tables

Hello,
 
can anyone please help me with the source code for login and registration using custom tables.
I am able to do using users table but not able to do using my existing db tables.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

JSON string is showed instead of used

I recently added jQuery file upload (https://github.com/blueimp/jQuery-File-Upload) to my custom-made CMS system. Uploading images works fine, but loading the uploaded images doesn't. In fact: the JSON string appears on top of my file:

{"files":[{"name":"foto1.jpg","size":221882,"url":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\foto1.jpg","thumbUrl":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\thumb\/foto1.jpg","deleteUrl":"http:\/\/cake.optiekcardoen.be\/app\/webroot\/index.php?file=foto1.jpg","deleteType":"DELETE"},{"name":"foto2.jpg","size":184839,"url":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\foto2.jpg","thumbUrl":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\thumb\/foto2.jpg","deleteUrl":"http:\/\/cake.optiekcardoen.be\/app\/webroot\/index.php?file=foto2.jpg","deleteType":"DELETE"},{"name":"foto3 (1).jpg","size":171300,"url":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\foto3%20%281%29.jpg","thumbUrl":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\thumb\/foto3%20%281%29.jpg","deleteUrl":"http:\/\/cake.optiekcardoen.be\/app\/webroot\/index.php?file=foto3%20%281%29.jpg","deleteType":"DELETE"},{"name":"foto3.jpg","size":171300,"url":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\foto3.jpg","thumbUrl":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\thumb\/foto3.jpg","deleteUrl":"http:\/\/cake.optiekcardoen.be\/app\/webroot\/index.php?file=foto3.jpg","deleteType":"DELETE"},{"name":"foto4.jpg","size":222763,"url":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\foto4.jpg","thumbUrl":"D:\\Websites\\Optiek Cardoen\\05 - Cake\\app\\webroot\\img\\outlets\\6\\thumb\/foto4.jpg","deleteUrl":"http:\/\/cake.optiekcardoen.be\/app\/webroot\/index.php?file=foto4.jpg","deleteType":"DELETE"}]}

How can I solve this so the JSON string doesn't appear like that anymore?

Here's the controller code in OutletPhotosController.php:

public function add()
   
{
       
App::import('Vendor', 'CoasterCms.UploadHandler', array('file' => 'jQueryFileUpload' . DS . 'UploadHandler.php'));
       
        $options
= array(
           
'upload_dir' => WWW_ROOT . 'img' . DS . 'outlets' . DS . $this->request->params['named']['outlet_id'] . DS,
           
'upload_url' => WWW_ROOT . 'img' . DS . 'outlets' . DS . $this->request->params['named']['outlet_id'] . DS,
           
'accept_file_types' => '/\.(gif|jpe?g|png)$/i',
           
'image_versions' => array(
               
'thumb' => array(
                   
'max_width' => 20,
                   
'max_height' => 20,
                   
'crop' => true
               
)
           
)
       
);


        $upload_handler
= new CustomUploadHandler($options);
}


And here's my very simple script in main.js:

<script>
$
(function () {
   
'use strict';


   
// Initialize the jQuery File Upload widget:
    $
('#fileupload').fileupload({
       
   
});
});
</script>

Thanks for helping ;)

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Saturday, May 30, 2015

Re: Forgot password in cakephp 3.0

See https://github.com/dereuromark/cakefest/blob/3.0/src/Controller/AccountController.php#L82 for an example



Am Dienstag, 26. Mai 2015 14:39:33 UTC+2 schrieb Karthik Keyan:
Hi, 
    How we set the validation for the forgot password. Password can be send to email please send the functionality of forgot password
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

I need some help with CakeDC Search


I need some help with CakeDC Search i configured the plugin with the instructions and nothing happens.

Only show the text of the search on the Web Browser search input.

Please if someone have a working configuration and can share with me.

thanks in advance!


I need the most simple configuration nothing special.

Sorry for my bad english.

Jesus Castro - Costa Rica

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Friday, May 29, 2015

cakephp 3.0 same controller name for admin and users

I am using cakephp 3.0 and want to write some admin actions and some users actions in users controller. admin actions should be accessible from admin routing and user actions should be accessible without admin routing

I know in cakephp 3.0 for admin, users controller should be in

src/Controller/Admin/UsersController.php

and for normal users, users controller should be in

src/Controller/UsersController.php

Now the confusion is, Is this correct to put same controller name is in 2 different directories or am I missing something?

This question is also asked on stackoverflow by me

http://stackoverflow.com/questions/30536972/cakephp-3-0-same-controller-name-for-admin-and-users

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Cake 3 - Modelless Forms with nested forms / elements

Hi,

within the documenation I did only find a simple example (http://book.cakephp.org/3.0/en/core-libraries/form.html).
Is it possible to create a form with "Sub-Forms"?


class PhoneNumberForm extends Form
end

class
ContactForm extends Form { protected function _buildSchema(Schema $schema) { return $schema->addField('name', 'string') ->addField('email', ['type' => 'string']) ->addField('body', ['type' => 'text']);
->addField('phonenumbers', ['type' => ????? ]); } // should be an array of PhoneNumberForms
}


regards
dieter

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Cake 3 Link to nested resource

Hi,

I didn't find any hint how to create a link to a nested Resource.

Routes:

$routes->resources('Posts', function ($routes) {
$routes->resources('Comments');
});

View:

$this->Html->link("Show Comment", ['controller' => '?????', 'action' => 'view', ???])

Can some one point me to documentation covering this topic?

regards
dieter

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Thursday, May 28, 2015

Re: CakePHP 2.6.6 and 3.0.6 Released (security fixes)

Earlier today, we announced the release of 2.6.6. This version contained
a syntax error in PHP < 5.4. This error has been corrected in 2.6.7. If
you are running PHP < 5.4.0 you should upgrade to 2.6.7 instead of 2.6.6.

In doing the security release, I did not follow our normal process of ensuring
that there is a passing build on all supported PHP versions before doing the
release. This was a mistake and will not happen again.


On Thursday, 28 May 2015 11:57:53 UTC-4, mark_story wrote:
The CakePHP core team is ready to announce the immediate availability of CakePHP
2.6.6 and 3.0.6. These are maintenance releases that contain important security
fixes.

## Security Fixes

Earlier this week we were notified that RequestHandlerComponent had
a vulnerability that would allow well crafted requests to create a denial of
service attack. RequestHandlerComponent leverages `Xml::build()` which allows
reading local files. We recommend that all applications using
RequestHandlerComponent upgrade, or disable parsing XML payloads. To disable XML
payload parsing you can do the following

```php
// In a controller's beforeFilter
$this->RequestHandler->addInputType('xml', function() { return []; });
```

The above code will replace the built-in XML parsing with a no-op function. We'd
like to thank Takeshi Terada for notifying us of this security issue using our
[Security Issue Process]
(http://book.cakephp.org/3.0/en/contributing/tickets.html#reporting-security-issues>).

## Other Fixes in 2.6.6

* `FormHelper::radio()` now correctly generates ID attributes for radio
  buttons with multibyte values.
* `Inflector::humanize()` and `Inflector::underscore()` work correctly with
  UTF8 characters now.

## Other Fixes in 3.0.6

* `FormHelper::radio()` now correctly generates ID attributes for radio
  buttons with multibyte values.
* `Inflector::humanize()` and `Inflector::underscore()` work correctly with
  UTF8 characters now.
* URLs in `FormHelper::postLink()` are no longer double encoded.
* `PaginatorHelper::numbers()` now supports the `url` option.
* Error.trace is now respected when logging exceptions.
* The Entity accessors cache introduced in 3.0.3 has been removed. It caused
  a number of issues and didn't greatly improve performance.
* `EntityTrait::getOriginal()`  and `EntityTrait::extractOriginal()` now
  return values that were initially null.
* Empty query expressions used in association query builders no longer cause
  invalid SQL to be generated.

As always, a huge thanks to all the community members that helped make this
release happen by reporting issues and sending pull requests.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Unusual Table name/ Convention Naming issue

Hello I am having a naming convention problem that I would normally just rename the table. However, that is not an option. 

Background info:Table name is myCallDatas1

I am trying to create a controller for this table. I went to http://inflector.cakephp.org/ and it returned myCallDatas1s. I have tried to use this as a controller(MyCallDatas1sController) name and I get the following error message: Error: Create the class MyCallDatas1sController.php. This table can not be renamed(it is attached to mission critical appliances) is there a work around to fix this issue?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Cake 3 Cookie - not persistent

Hello, I think I must be missing something simple.

On just a simple view action in the controller:

$this->loadComponent('Cookie');
$this->Cookie->config('path', '/');
 $this->Cookie->config([
  'expires' => '+10 days',
  'httpOnly' => true
]);
$this->Cookie->write('name', 'Larry');
echo $this->Cookie->read('name');

This works and displays the value.
However after commenting out the 7th line that writes the value and then a refresh, nothing is displayed.

What am I missing??

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

How to use Plugins in CakePHP 2.6..??

Hello there,

My name is Solomon G. I am making E-commerce website for a friend and I was wondering if some one could tell me how to use cakePHP Plugins..?? 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

CakePHP 2.6.6 and 3.0.6 Released (security fixes)

The CakePHP core team is ready to announce the immediate availability of CakePHP
2.6.6 and 3.0.6. These are maintenance releases that contain important security
fixes.

## Security Fixes

Earlier this week we were notified that RequestHandlerComponent had
a vulnerability that would allow well crafted requests to create a denial of
service attack. RequestHandlerComponent leverages `Xml::build()` which allows
reading local files. We recommend that all applications using
RequestHandlerComponent upgrade, or disable parsing XML payloads. To disable XML
payload parsing you can do the following

```php
// In a controller's beforeFilter
$this->RequestHandler->addInputType('xml', function() { return []; });
```

The above code will replace the built-in XML parsing with a no-op function. We'd
like to thank Takeshi Terada for notifying us of this security issue using our
[Security Issue Process]
(http://book.cakephp.org/3.0/en/contributing/tickets.html#reporting-security-issues>).

## Other Fixes in 2.6.6

* `FormHelper::radio()` now correctly generates ID attributes for radio
  buttons with multibyte values.
* `Inflector::humanize()` and `Inflector::underscore()` work correctly with
  UTF8 characters now.

## Other Fixes in 3.0.6

* `FormHelper::radio()` now correctly generates ID attributes for radio
  buttons with multibyte values.
* `Inflector::humanize()` and `Inflector::underscore()` work correctly with
  UTF8 characters now.
* URLs in `FormHelper::postLink()` are no longer double encoded.
* `PaginatorHelper::numbers()` now supports the `url` option.
* Error.trace is now respected when logging exceptions.
* The Entity accessors cache introduced in 3.0.3 has been removed. It caused
  a number of issues and didn't greatly improve performance.
* `EntityTrait::getOriginal()`  and `EntityTrait::extractOriginal()` now
  return values that were initially null.
* Empty query expressions used in association query builders no longer cause
  invalid SQL to be generated.

As always, a huge thanks to all the community members that helped make this
release happen by reporting issues and sending pull requests.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: How to set Authorization wise view in the Form in CakePHP-3.0

Thanks a lot. its working now. Is there any other easiest way to do so? 

On Thu, May 28, 2015 at 8:50 PM, euromark <dereuromark@gmail.com> wrote:
check() and comparison is really a bad idea
the first returns bool, how should that ever === to a string?
wrapping that with !empty() makes this completely wrong

if(!empty($this->request->session()->check('Auth.User.role') === 'superadmin')){


Try

if ($this->request->session()->read('Auth.User.role') === 'superadmin') {}

instead


Am Donnerstag, 28. Mai 2015 15:54:47 UTC+2 schrieb Bayezid Alam:

Hi All,

I want to set an authorization in the registration of a form using CakePHP 3.0.

Before asking here, i tried below things but no luck in my favor.

Suppose i have role field in the usersTable like 'superuser', 'admin', 'user'.

I want to provide permission superuser to make all the things like create admin and user. and then admin can create admin and user, and user can make user only.

The code i tried in the add function of UsersController.

if($this->Auth->user['role'] === 'superuser'){          $roles = $this->Users->find('list');                  } elseif ($this->Auth->user['role'] === 'admin') {          $roles = $this->Users->find('list')->where(['Users.role !==' => 'superuser']);      } else {          $roles = $this->Users->find('list')->where(['Users.role' => 'user']);      }

after failing i tried below things in the add.ctp

if(!empty($this->request->session()->check('Auth.User.role') === 'superadmin')){              echo $this->Form->input('role',['options' => ['admin' => 'Admin', 'user' => 'User']]);          } elseif(!empty($this->request->session()->check('Auth.User.role') === 'admin')){              echo $this->Form->input('role',['options' => ['user' => 'User', 'icr' => 'ICR', 'routing' => 'Routing']]);          } else {              echo $this->Form->input('role', ['options' => ['user' => 'User']]);          }

Could you please suggest on this regard or are there any easiest ways to do so?

http://stackoverflow.com/questions/30487160/how-to-set-authorization-wise-view-in-the-form-in-cakephp-3-0

Thanks

Bayezid

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: How to set Authorization wise view in the Form in CakePHP-3.0

check() and comparison is really a bad idea
the first returns bool, how should that ever === to a string?
wrapping that with !empty() makes this completely wrong

if(!empty($this->request->session()->check('Auth.User.role') === 'superadmin')){


Try

if ($this->request->session()->read('Auth.User.role') === 'superadmin') {}

instead


Am Donnerstag, 28. Mai 2015 15:54:47 UTC+2 schrieb Bayezid Alam:

Hi All,

I want to set an authorization in the registration of a form using CakePHP 3.0.

Before asking here, i tried below things but no luck in my favor.

Suppose i have role field in the usersTable like 'superuser', 'admin', 'user'.

I want to provide permission superuser to make all the things like create admin and user. and then admin can create admin and user, and user can make user only.

The code i tried in the add function of UsersController.

if($this->Auth->user['role'] === 'superuser'){          $roles = $this->Users->find('list');                  } elseif ($this->Auth->user['role'] === 'admin') {          $roles = $this->Users->find('list')->where(['Users.role !==' => 'superuser']);      } else {          $roles = $this->Users->find('list')->where(['Users.role' => 'user']);      }

after failing i tried below things in the add.ctp

if(!empty($this->request->session()->check('Auth.User.role') === 'superadmin')){              echo $this->Form->input('role',['options' => ['admin' => 'Admin', 'user' => 'User']]);          } elseif(!empty($this->request->session()->check('Auth.User.role') === 'admin')){              echo $this->Form->input('role',['options' => ['user' => 'User', 'icr' => 'ICR', 'routing' => 'Routing']]);          } else {              echo $this->Form->input('role', ['options' => ['user' => 'User']]);          }

Could you please suggest on this regard or are there any easiest ways to do so?

http://stackoverflow.com/questions/30487160/how-to-set-authorization-wise-view-in-the-form-in-cakephp-3-0

Thanks

Bayezid

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

How to set Authorization wise view in the Form in CakePHP-3.0

Hi All,

I want to set an authorization in the registration of a form using CakePHP 3.0.

Before asking here, i tried below things but no luck in my favor.

Suppose i have role field in the usersTable like 'superuser', 'admin', 'user'.

I want to provide permission superuser to make all the things like create admin and user. and then admin can create admin and user, and user can make user only.

The code i tried in the add function of UsersController.

if($this->Auth->user['role'] === 'superuser'){          $roles = $this->Users->find('list');                  } elseif ($this->Auth->user['role'] === 'admin') {          $roles = $this->Users->find('list')->where(['Users.role !==' => 'superuser']);      } else {          $roles = $this->Users->find('list')->where(['Users.role' => 'user']);      }

after failing i tried below things in the add.ctp

if(!empty($this->request->session()->check('Auth.User.role') === 'superadmin')){              echo $this->Form->input('role',['options' => ['admin' => 'Admin', 'user' => 'User']]);          } elseif(!empty($this->request->session()->check('Auth.User.role') === 'admin')){              echo $this->Form->input('role',['options' => ['user' => 'User', 'icr' => 'ICR', 'routing' => 'Routing']]);          } else {              echo $this->Form->input('role', ['options' => ['user' => 'User']]);          }

Could you please suggest on this regard or are there any easiest ways to do so?

http://stackoverflow.com/questions/30487160/how-to-set-authorization-wise-view-in-the-form-in-cakephp-3-0

Thanks

Bayezid

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Tuesday, May 26, 2015

Cakephp with chat

I have a system in cakephp I would like to develop a chat for users to communicate within that system, as I'm structuring the idea i like to suggestions from those who have developed something related to it or if someone has a vision of how to start this development? Thank you

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Forgot password in cakephp 3.0

Hi, 
    How we set the validation for the forgot password. Password can be send to email please send the functionality of forgot password
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Filtering by multiple associated data

hey guys, is there a way to filter associated results with 2 tags? 


The documentation only shows 1 tag to filter. I'm hoping to filter with 2 tags, like articles with "Finance" and "Tips" tag.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Monday, May 25, 2015

Re: Avoid converting date/datetime fields to Cake/Time instances with CakePHP 3

Up!

El miércoles, 13 de mayo de 2015, 21:33:08 (UTC+1), Aday Talavera escribió:
First off, sorry for the "question spam". I'm just posting all issues of the last two weeks in a short period of time. I hope that this isn't disturbing anyone.

While trying to figure how to use combine with collections and entities (is in other thread) I didn't found an easy way to avoid date / datetime fields of DB been converted to Time instances.

$query->hydrate(false);

Didn't work, date / datetime field is also converted to a Cake/Time instance

There exists an easy way to avoid that conversion?

I was forced to do something like this in the collection to use combine or indexBy groupBy collection functions with date fields:

            ->each(function ($entity){
                $entity
->dateStr = $entity->date->toDateString();
               
return $entity;
           
})
            ->combine('dateStr', 'id')
            ->indexBy('dateStr')
           
->GroupBy('dateStr')

Cheers.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: hello every body; I have a little problem. when I use localhost in bookmarker example, it not take css format options, when I use localhost:8765 all works ok, where is the diference???

Probably you don't have mod rewrite enabled.

El viernes, 15 de mayo de 2015, 20:08:15 (UTC+1), Jesus Cantú escribió:
hello every body;

I'm  new with cake, I'm traying to do the examples,  then I used the composer and I create database files of bookmarker, but  I have a little problem. when I use my server XAMP, localhost in bookmarker example, it not take css format options, when I use CAKE SERVER; localhost:8765 all works ok, where is the diference???,

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: Migrate from Cake 2.x

Thanks Mark! I believe it is very useful to add this functionality to the plugin.


Em segunda-feira, 25 de maio de 2015 05:37:51 UTC-3, euromark escreveu:
Let me know what you came up with
We should add this to the https://github.com/dereuromark/cakephp-shim plugin to ease migration of those forms from 2.x to 3.x in general.
The IDs generated in 3.x are too collision-likely for me too.

Mark


Am Mittwoch, 20. Mai 2015 13:39:35 UTC+2 schrieb gersonfs:
Hello!

Is there a way to use the input id attribute from CakePHP 2 in CakePHP 3? Like define a custom method for generate id attribute value? Or better yet, use the FormHelper 2.x version of CakePHP.

CakePHP 3 break all my javascript files based on id attribute. I did not see any observations on this change in migration guide at the Form Helper session.

I use CakePHP since the 0.x version, over 200 projects done, and never an update has been so problematic. I hope this does not happen in the next major releases.

I completely understand that our ORM was outdated and it needed an upgrade facing OO. It's also great to have PHP 5.4 features. Although updates have affected 99% of my code: models and forms/javascript.

Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: Migrate from Cake 2.x

Thanks José, compliments of OO!

Em quarta-feira, 20 de maio de 2015 17:24:25 UTC-3, José Lorenzo escreveu:
One way is to extend the form helper and override the _domId() function:


On Wednesday, May 20, 2015 at 1:39:35 PM UTC+2, gersonfs wrote:
Hello!

Is there a way to use the input id attribute from CakePHP 2 in CakePHP 3? Like define a custom method for generate id attribute value? Or better yet, use the FormHelper 2.x version of CakePHP.

CakePHP 3 break all my javascript files based on id attribute. I did not see any observations on this change in migration guide at the Form Helper session.

I use CakePHP since the 0.x version, over 200 projects done, and never an update has been so problematic. I hope this does not happen in the next major releases.

I completely understand that our ORM was outdated and it needed an upgrade facing OO. It's also great to have PHP 5.4 features. Although updates have affected 99% of my code: models and forms/javascript.

Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: Migrate from Cake 2.x

Let me know what you came up with
We should add this to the https://github.com/dereuromark/cakephp-shim plugin to ease migration of those forms from 2.x to 3.x in general.
The IDs generated in 3.x are too collision-likely for me too.

Mark


Am Mittwoch, 20. Mai 2015 13:39:35 UTC+2 schrieb gersonfs:
Hello!

Is there a way to use the input id attribute from CakePHP 2 in CakePHP 3? Like define a custom method for generate id attribute value? Or better yet, use the FormHelper 2.x version of CakePHP.

CakePHP 3 break all my javascript files based on id attribute. I did not see any observations on this change in migration guide at the Form Helper session.

I use CakePHP since the 0.x version, over 200 projects done, and never an update has been so problematic. I hope this does not happen in the next major releases.

I completely understand that our ORM was outdated and it needed an upgrade facing OO. It's also great to have PHP 5.4 features. Although updates have affected 99% of my code: models and forms/javascript.

Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Sunday, May 24, 2015

Re: AWS, Centos 7 and file caching

Hello Jeremy Burns 
I fixed this without rebuild Instance like bellow.
I set chown of this folder the same as cakephp path instead of root and it's works

/var/www/html/cake_source user:user
Default on AWS: /var root:root
I config /var to user:user

sudo chmod -R user:user /var

Thank you for your reply
Hung

On Monday, May 25, 2015 at 2:13:26 PM UTC+9, Jeremy Burns wrote:
Nope. We rebuilt the box with another version of Linux.

On 25 May 2015, at 04:15, HL <lecaoq...@gmail.com> wrote:

I met the same error. Did you fixed it? Thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+u...@googlegroups.com.
To post to this group, send email to cake...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.