mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Merge pull request #443 from fermionic/new-users-privacy-settings
automatically make posts private for new users
This commit is contained in:
commit
8c064069d9
7 changed files with 155 additions and 69 deletions
|
@ -277,6 +277,20 @@ function create_user($arr) {
|
|||
require_once('include/group.php');
|
||||
group_add($newuid, t('Friends'));
|
||||
|
||||
if(! get_config('system', 'newuser_public')) {
|
||||
$r = q("SELECT id FROM `group` WHERE uid = %d AND name = '%s'",
|
||||
intval($newuid),
|
||||
dbesc(t('Friends'))
|
||||
);
|
||||
if($r) {
|
||||
q("UPDATE user SET def_gid = %d, allow_gid = '%s' WHERE uid = %d",
|
||||
intval($r[0]['id']),
|
||||
dbesc("<" . $r[0]['id'] . ">"),
|
||||
intval($newuid)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// if we have no OpenID photo try to look up an avatar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue