X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fuser.php;h=2477438bf4deab4a4e9806f7df50156ef9753c29;hb=5cfa7dd04110dde2e9b1836f7d40930f17155029;hp=75a91b096770f80e6c8cb4db63e8539accf6666f;hpb=bad66a1154b3ef6ba639038218317f7ac5bf43d7;p=friendica.git diff --git a/include/user.php b/include/user.php index 75a91b0967..2477438bf4 100644 --- a/include/user.php +++ b/include/user.php @@ -24,9 +24,11 @@ function create_user($arr) { $email = ((x($arr,'email')) ? notags(trim($arr['email'])) : ''); $openid_url = ((x($arr,'openid_url')) ? notags(trim($arr['openid_url'])) : ''); $photo = ((x($arr,'photo')) ? notags(trim($arr['photo'])) : ''); - $publish = ((x($arr,'profile_publish_reg') && intval($arr['profile_publish_reg'])) ? 1 : 0); $password = ((x($arr,'password')) ? trim($arr['password']) : ''); + $blocked = ((x($arr,'blocked')) ? intval($arr['blocked']) : 0); + $verified = ((x($arr,'verified')) ? intval($arr['verified']) : 0); + $publish = ((x($arr,'profile_publish_reg') && intval($arr['profile_publish_reg'])) ? 1 : 0); $netpublish = ((strlen(get_config('system','directory_submit_url'))) ? $publish : 0); $tmp_str = $openid_url; @@ -282,7 +284,11 @@ function create_user($arr) { $filename = basename($photo); $img_str = fetch_url($photo,true); - $img = new Photo($img_str); + // guess mimetype from headers or filename + $type = guess_image_type($photo,true); + + + $img = new Photo($img_str, $type); if($img->is_valid()) { $img->scaleImageSquare(175); @@ -322,4 +328,4 @@ function create_user($arr) { $result['user'] = $u; return $result; -} \ No newline at end of file +}