如何使用带有 Cakedc 插件的 Cakephp 中的登录用户图像

how to use logged in user image in Cakephp with Cakedc plugin

如何使用cakedc插件查看cakephp 3.0中用户的图像。有两个表,一个用于用户,另一个用于社交帐户详细信息。我想知道如何为普通用户和其他使用 facebook 登录的用户获取图像

有许多插件可用于在 CakePHP 中上传图像和处理它们(裁剪、调整大小等),请查看此列表 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

请注意,这在很大程度上取决于所选的上传插件,但大多数插件都会提供您需要附加到用户的行为 Table。

然后覆盖用户 edit/add 模板以添加头像图片上传所需的文件字段。