PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 1, 2022

[FIXED] how to use logged in user image in Cakephp with Cakedc plugin

 November 01, 2022     cakedc, cakephp, cakephp-3.0     No comments   

Issue

how to check the image of user in cakephp 3.0 with cakedc plugin. There are two tables one for users and other for social account details. I want to how to do i fetch images for normal user and other who use login with facebook


Solution

There are many plugins available to upload images and process them (crop, resize etc) in CakePHP, check this list https://github.com/FriendsOfCake/awesome-cakephp#imagery and https://github.com/FriendsOfCake/awesome-cakephp#files. Then you'll need to extend the CakeDC Users Plugin to attach the upload related behavior, follow the documentation to extend the Users Table here https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md#extending-the-model-tableentity

Note this will depend a lot on the upload plugin selected, but most of them will provide a behavior you'll need to attach to the Users Table.

Then override the users edit/add templates to add the required file fields for the avatar image upload.



Answered By - steinkel
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing