converted more to dbm::is_result() + added braces/space

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-20 15:37:27 +01:00
parent 0e58bf6675
commit 51716957b2
13 changed files with 61 additions and 41 deletions

View file

@ -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)
);