Function names

Update function names and corresponding function calls
This commit is contained in:
Adam Magness 2017-11-29 12:17:12 -05:00
parent 54827e7fed
commit 0091d318e5
23 changed files with 668 additions and 535 deletions

View file

@ -285,23 +285,22 @@ function create_user($arr) {
$photo = avatar_img($email);
// unless there is no avatar-plugin loaded
if(strlen($photo)) {
if (strlen($photo)) {
$photo_failure = false;
$filename = basename($photo);
$img_str = fetch_url($photo,true);
$img_str = fetch_url($photo, true);
// guess mimetype from headers or filename
$type = guess_image_type($photo,true);
$type = Photo::guessImageType($photo, true);
$img = new Photo($img_str, $type);
if($img->is_valid()) {
if ($img->isValid()) {
$img->scaleImageSquare(175);
$hash = photo_new_resource();
$r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 4 );
$r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 4);
if ($r === false) {
$photo_failure = true;