aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-12 02:02:35 -0800
committerfriendica <info@friendica.com>2013-02-12 02:02:35 -0800
commit3ee75a795a471573de307d7be70bfb61bf1d63fa (patch)
treebabacf0dcbcdd3ee373b1bf6eb323c8bd455bd53 /include
parente7170cb5134677eb4352f1852b818aef73bfdb0a (diff)
downloadvolse-hubzilla-3ee75a795a471573de307d7be70bfb61bf1d63fa.tar.gz
volse-hubzilla-3ee75a795a471573de307d7be70bfb61bf1d63fa.tar.bz2
volse-hubzilla-3ee75a795a471573de307d7be70bfb61bf1d63fa.zip
Whinging whining stupid fucks.
Diffstat (limited to 'include')
-rw-r--r--include/account.php8
-rw-r--r--include/identity.php18
2 files changed, 13 insertions, 13 deletions
diff --git a/include/account.php b/include/account.php
index 8809d908a..a31dbba4b 100644
--- a/include/account.php
+++ b/include/account.php
@@ -332,14 +332,6 @@ function user_allow($hash) {
intval($register[0]['uid'])
);
- $r = q("SELECT uid FROM profile WHERE uid = %d AND is_default = 1",
- intval($account[0]['account_id'])
- );
-
- if($r && $r[0]['publish']) {
- proc_run('php',"include/directory.php",$r[0]['uid']);
- }
-
push_lang($register[0]['language']);
$email_tpl = get_intltext_template("register_open_eml.tpl");
diff --git a/include/identity.php b/include/identity.php
index bfe908a40..9bb4d09fa 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -80,7 +80,12 @@ function create_identity($arr) {
$sig = base64url_encode(rsa_sign($guid,$key['prvkey']));
$hash = base64url_encode(hash('whirlpool',$guid . $sig,true));
- // Force primary until importation works, then we'll offer a choice
+ // Force a few things on the short term until we can provide a theme or app with choice
+
+ $publish = 1;
+
+ if(array_key_exists('publish', $arr))
+ $publish = intval($arr['publish']);
$primary = true;
@@ -107,7 +112,7 @@ function create_identity($arr) {
dbesc($guid)
);
- if(! ($r && count($r))) {
+ if(! $r) {
$ret['message'] = t('Unable to retrieve created identity');
return $ret;
}
@@ -167,13 +172,14 @@ function create_identity($arr) {
// It's ok for this to fail if it's an imported channel, and therefore the hash is a duplicate
- $r = q("INSERT INTO profile ( aid, uid, profile_guid, profile_name, is_default, name, photo, thumb)
- VALUES ( %d, %d, '%s', '%s', %d, '%s', '%s', '%s') ",
+ $r = q("INSERT INTO profile ( aid, uid, profile_guid, profile_name, is_default, publish, name, photo, thumb)
+ VALUES ( %d, %d, '%s', '%s', %d, %d, '%s', '%s', '%s') ",
intval($ret['channel']['channel_account_id']),
intval($newuid),
dbesc(random_string()),
t('Default Profile'),
1,
+ $publish,
dbesc($ret['channel']['channel_name']),
dbesc($a->get_baseurl() . "/photo/profile/l/{$newuid}"),
dbesc($a->get_baseurl() . "/photo/profile/m/{$newuid}")
@@ -198,7 +204,9 @@ function create_identity($arr) {
group_add($newuid, t('Friends'));
call_hooks('register_account', $newuid);
-
+
+ proc_run('php','include/directory.php', $ret['channel']['channel_id']);
+
$ret['success'] = true;
return $ret;