eye4web / zfc-user-profile-picture
Adds profile picture functionality to ZfcUser.
0.0.1
2015-03-07 22:05 UTC
Requires
- php: ~5.4
- zf-commons/zfc-user: ~1.2
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ~4.0.0
- squizlabs/php_codesniffer: ~2.0.0@DEV
This package is not auto-updated.
Last update: 2024-10-26 16:54:19 UTC
README
Introduction
This module adds profile picture upload functionality to ZfcUser.
Installation
With composer
-
Add this project composer.json:
"require": { "eye4web/zfc-user-profile-picture": "dev-master" }
-
Now tell composer to download the module by running the command:
$ php composer.phar update
-
Enable it in your
application.config.php
file.<?php return array( 'modules' => array( // ... 'Eye4web\ZfcUser\ProfilePicture' ), // ... );
-
Copy
config/eye4web.zfcuser.profilepicture.global.php.dist
toconfig/autoload/eye4web.zfcuser.profilepicture.global.php
and configure to your needs. -
Make your User Entity implement
Eye4web\ZfcUser\ProfilePicture\Entity\ProfilePictureInterface
use Eye4web\ZfcUser\ProfilePicture\Entity\ProfilePictureInterface; use ZfcUser\Entity\UserInterface; class User implements ProfilePictureInterface, UserInterface { // ... protected $profile_picture; public function getProfilePicture() { return $this->profile_picture; } public function setProfilePicture($path) { $this->profile_picture = $path; } }
-
Make sure you've libmagic and fileinfo php extension installed.