Skip to content

voycey/cakephp-gravatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

CakePHP 2.x Gravatar Helper

###A Gravatar Helper for CakePHP 2.x

A really quick Gravatar Helper for CakePHP 2.x - We allow users to upload images to their profiles in order to replace the standard placeholder image / auto generated Gravatar Image

Usage:

  1. Add 'Gravatar' to your helper array in your controller
  2. Call it like this:
$this->Gravatar->displayProfilePicture($user['UserDetail']['photo'], $user['User']['email']);

Replace the variables as is required by your system, if no email is provided then the Gravatar cannot be created and a placeholder will be used.

You can also just generate a Gravatar URL directly by calling:

$this->Gravatar->get_gravatar($user['User']['email']);

See the PHPDoc in the code for other parameters you can use (including one to generate a full IMG tag)

About

A Gravatar Helper for CakePHP 2.3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages