mirror of
https://github.com/friendica/friendica
synced 2025-04-25 14:30:10 +00:00
converted more to dbm::is_result() + added braces/space
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
0e58bf6675
commit
51716957b2
13 changed files with 61 additions and 41 deletions
|
@ -262,7 +262,7 @@ function create_user($arr) {
|
|||
intval($netpublish)
|
||||
|
||||
);
|
||||
if($r === false) {
|
||||
if ($r === false) {
|
||||
$result['message'] .= t('An error occurred creating your default profile. Please try again.') . EOL;
|
||||
// Start fresh next time.
|
||||
$r = q("DELETE FROM `user` WHERE `uid` = %d",
|
||||
|
@ -325,24 +325,27 @@ function create_user($arr) {
|
|||
|
||||
$r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 4 );
|
||||
|
||||
if($r === false)
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
}
|
||||
|
||||
$img->scaleImage(80);
|
||||
|
||||
$r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 5 );
|
||||
|
||||
if($r === false)
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
}
|
||||
|
||||
$img->scaleImage(48);
|
||||
|
||||
$r = $img->store($newuid, 0, $hash, $filename, t('Profile Photos'), 6 );
|
||||
|
||||
if($r === false)
|
||||
if ($r === false) {
|
||||
$photo_failure = true;
|
||||
}
|
||||
|
||||
if(! $photo_failure) {
|
||||
if (! $photo_failure) {
|
||||
q("UPDATE `photo` SET `profile` = 1 WHERE `resource-id` = '%s' ",
|
||||
dbesc($hash)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue