Rebase from upstream
This commit is contained in:
commit
cc95f91c54
@ -84,7 +84,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
|
|||||||
|
|
||||||
// Premium channel, set confirm before callback to avoid recursion
|
// Premium channel, set confirm before callback to avoid recursion
|
||||||
|
|
||||||
if(array_key_exists('connect_url',$j) && (! $confirm))
|
if(array_key_exists('connect_url',$j) && ($interactive) && (! $confirm))
|
||||||
goaway(zid($j['connect_url']));
|
goaway(zid($j['connect_url']));
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,10 +27,13 @@ function identity_check_service_class($account_id) {
|
|||||||
intval(PAGE_REMOVED)
|
intval(PAGE_REMOVED)
|
||||||
);
|
);
|
||||||
if(! ($r && count($r))) {
|
if(! ($r && count($r))) {
|
||||||
|
$ret['total_identities'] = 0;
|
||||||
$ret['message'] = t('Unable to obtain identity information from database');
|
$ret['message'] = t('Unable to obtain identity information from database');
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ret['total_identities'] = intval($r[0]['total']);
|
||||||
|
|
||||||
if(! service_class_allows($account_id,'total_identities',$r[0]['total'])) {
|
if(! service_class_allows($account_id,'total_identities',$r[0]['total'])) {
|
||||||
$result['message'] .= upgrade_message();
|
$result['message'] .= upgrade_message();
|
||||||
return $result;
|
return $result;
|
||||||
@ -166,10 +169,12 @@ function create_identity($arr) {
|
|||||||
$ret['message'] = t('No account identifier');
|
$ret['message'] = t('No account identifier');
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
$ret=identity_check_service_class($arr['account_id']);
|
$ret = identity_check_service_class($arr['account_id']);
|
||||||
if (!$ret['success']) {
|
if (!$ret['success']) {
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
// save this for auto_friending
|
||||||
|
$total_identities = $ret['total_identities'];
|
||||||
|
|
||||||
$nick = mb_strtolower(trim($arr['nickname']));
|
$nick = mb_strtolower(trim($arr['nickname']));
|
||||||
if(! $nick) {
|
if(! $nick) {
|
||||||
@ -389,6 +394,20 @@ function create_identity($arr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// auto-follow any of the hub's pre-configured channel choices.
|
||||||
|
// Only do this if it's the first channel for this account;
|
||||||
|
// otherwise it could get annoying. Don't make this list too big
|
||||||
|
// or it will impact registration time.
|
||||||
|
|
||||||
|
$accts = get_config('system','auto_follow');
|
||||||
|
if(($accts) && (! $total_identities)) {
|
||||||
|
if(! is_array($accts))
|
||||||
|
$accts = array($accts);
|
||||||
|
foreach($accts as $acct) {
|
||||||
|
if(trim($acct))
|
||||||
|
new_contact($newuid,trim($acct),$ret['channel'],false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
call_hooks('register_account', $newuid);
|
call_hooks('register_account', $newuid);
|
||||||
|
|
||||||
|
@ -1674,8 +1674,6 @@ function process_location_delivery($sender,$arr,$deliveries) {
|
|||||||
logger('process_location_delivery: results: ' . print_r($x,true), LOGGER_DATA);
|
logger('process_location_delivery: results: ' . print_r($x,true), LOGGER_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to merge this code with that in the import_xchan function so as to make it
|
|
||||||
// easier to maintain changes.
|
|
||||||
|
|
||||||
function sync_locations($sender,$arr,$absolute = false) {
|
function sync_locations($sender,$arr,$absolute = false) {
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-09-30.814
|
2014-10-01.815
|
||||||
|
Reference in New Issue
Block a user