]> git.mxchange.org Git - friendica.git/blobdiff - include/user.php
minor tweaks to some tpl files
[friendica.git] / include / user.php
index 75a91b096770f80e6c8cb4db63e8539accf6666f..2477438bf4deab4a4e9806f7df50156ef9753c29 100644 (file)
@@ -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
+}