# |
Mar 8th 2018, 15:24 |
birdy247 |
Filename/DefaultTrait.php on line 19 and exactly 5 expected |
# |
Mar 8th 2018, 15:24 |
birdy247 |
but i get an exception |
# |
Mar 8th 2018, 15:24 |
birdy247 |
I am trying the nameCallback |
# |
Mar 8th 2018, 15:24 |
savant |
nice |
# |
Mar 8th 2018, 15:24 |
birdy247 |
I am using your upload plugin :+1: |
# |
Mar 8th 2018, 15:24 |
savant |
hi |
# |
Mar 8th 2018, 15:24 |
birdy247 |
Hey @savant |
# |
Mar 8th 2018, 13:50 |
jkpatel291289 |
@dakota you are right thanks.. |
# |
Mar 8th 2018, 13:46 |
dakota |
@jkpatel291289 That is pretty much right. Just add in a check that the `loadingmemolrdetails` key actually exists (Otherwise if somebody forgets to load it, it’ll thrown an error) |
# |
Mar 8th 2018, 13:32 |
jkpatel291289 |
is it right way.. its working though.. |
# |
Mar 8th 2018, 13:32 |
jkpatel291289 |
i came up with this https://gist.github.com/jaynarayan89/e9a3ac7deacf2d3fea84dacbe8cc9a70 |
# |
Mar 8th 2018, 13:29 |
joshualuckers |
@jkpatel291289 maybe this is what you are looking for: https://book.cakephp.org/3.0/en/orm/query-builder.html#adding-calculated-fields |
# |
Mar 8th 2018, 12:45 |
jkpatel291289 |
how to create virtual property in table using associations? I have a loadingmemo tabel with many lorryreceipts . lorryreceipts have weight. i want to add virtual property in loading memo table wich return total weight of all lr. |
# |
Mar 8th 2018, 12:45 |
steinkel |
there is a basic cakephp recipe you can tweak a bit and get atomic deployments |
# |
Mar 8th 2018, 12:43 |
neon1024 |
Nice @steinkel I’ll have to check that one out, I haven’t heard of it |
# |
Mar 8th 2018, 12:34 |
steinkel |
for deployment, we've been using https://github.com/deployphp/deployer for some time and works good |
# |
Mar 8th 2018, 12:00 |
neon1024 |
Now we are moving over to Ansible though, so we should be able to weave that into the playbook somewhere I’d think |
# |
Mar 8th 2018, 11:59 |
neon1024 |
Good idea @dereuromark we still just shell in an run it all manually, and I often forget to run migrations! |
# |
Mar 8th 2018, 11:47 |
dereuromark |
see my old https://twitter.com/dereuromark/status/918155913038479360 |
# |
Mar 8th 2018, 11:46 |
ghoritrilochan |
ok try |
# |
Mar 8th 2018, 11:45 |
dereuromark |
also run a clean composer install here instead of using outdated lock file or even composer cache files |
# |
Mar 8th 2018, 11:45 |
dereuromark |
ghori: you dont "upload", you deploy your project. basic shell scripts would suffice. the important point is that you in those deploy scripts also clear your cache etc. |
# |
Mar 8th 2018, 11:42 |
ghoritrilochan |
plz give me suggestion how to fix this problem..:tired_face: |
# |
Mar 8th 2018, 11:34 |
dereuromark |
Beginners I would always recommend https://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/ and the Passwordable behavior. Dry, clean and safe approach without modification on project level really. Using your own approach can shoot you in the foot very easily. And not aliasing the field, thus introducing injection vectors on user forms / edit etc. |
# |
Mar 8th 2018, 11:31 |
ghoritrilochan |
only open home page not open other all page why? |
# |
Mar 8th 2018, 11:30 |
ghoritrilochan |
http://shreehariji.com |
# |
Mar 8th 2018, 11:30 |
ghoritrilochan |
i was upload my project on server. but than after project not work propar |
# |
Mar 8th 2018, 11:28 |
ghoritrilochan |
hi... |
# |
Mar 8th 2018, 10:29 |
neon1024 |
Neatly wrapped for you by the framework :slightly_smiling_face: https://github.com/cakephp/cakephp/blob/master/src/Auth/DefaultPasswordHasher.php#L47 |
# |
Mar 8th 2018, 10:28 |
digitalfotografen |
Add a setPassword and a checkPassword method to your User entity |
# |
Mar 8th 2018, 10:28 |
neon1024 |
http://php.net/manual/en/function.password-hash.php |
# |
Mar 8th 2018, 10:27 |
neon1024 |
PHP even has a password function now :slightly_smiling_face: |
# |
Mar 8th 2018, 10:26 |
digitalfotografen |
@portilloster Put the password encrypt in your model, then You can reuse it from controllers and shells. But MD5 is no longer best practice for password hashing. Read the docs linked by Joshua. |
# |
Mar 8th 2018, 10:21 |
joshualuckers |
@portilloster https://book.cakephp.org/3.0/en/tutorials-and-examples/cms/authentication.html#adding-password-hashing |
# |
Mar 8th 2018, 10:17 |
slackebot |
$this->Usuarios->patchEntity($usuario, $this->request->getData()); if ($this->Usuarios->save($usuario)) { $this->Flash->success(__('The usuario has been saved.')); return $this->redirect(['action' => 'index']); } $this->Flash->error(__('The usuario could not be saved. Please, try again.')); } $this->set(compact('usuario')); } |
# |
Mar 8th 2018, 10:17 |
slackebot |
method * * @param string|null $id Usuario id. * @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise. * @throws \Cake\Network\Exception\NotFoundException When record not found. */ public function edit($id = null) { $usuario = $this->Usuarios->get($id, [ 'contain' => [] ]); if ($this->request->is(['patch', 'post', 'put'])) { $usuario = |
# |
Mar 8th 2018, 10:17 |
slackebot |
$usuario = $this->Usuarios->patchEntity($usuario, $this->request->getData()); if ($this->Usuarios->save($usuario)) { $this->Flash->success(__('The usuario has been saved.')); return $this->redirect(['action' => 'index']); } $this->Flash->error(__('The usuario could not be saved. Please, try again.')); } $this->set(compact('usuario')); } /** * Edit |
# |
Mar 8th 2018, 10:17 |
portilloster |
Hi again guys! I managed to encrypt with md5 the password on the database and also on my function login(). But I also want to encrypt the password when creating a new user or editing it. How can I manage that? I believe is adding some line on the user controller in the add and edit method but I dont know: public function add() { $usuario = $this->Usuarios->newEntity(); if ($this->request->is('post')) { |
# |
Mar 8th 2018, 09:06 |
megan |
patsuckow quality over quantity :slightly_smiling_face: |
# |
Mar 8th 2018, 08:59 |
neon1024 |
Hey everyone |
# |
Mar 8th 2018, 08:55 |
patsuckow |
Once again, I am convinced that although the cackephp community is not very large as I would like, but responsive :) |