I have add this code in components/com_community/models/profil.php on line 466.
To add a friend when a user is registering. This work fine for me.
The only probleme is that when a new user is log, firend id 667 is in this friend list but he can t see his stream until he go to freinds page.
I suppose it s because the friends field in community_user is not completed until user open the friends page.
Is there anyway to solve this?
I know this is not a part of your support, but it can made a good tips.
I assign developer to this thread, so maybe he could have a tip for you.
- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.
- Use the "Thank You" feature on any post that helped you
for community_user you must update the friendcount number and put userid as friends value for both user (667 and $userId).
for friends field must use coma as separator if friends more then one
Thanks a lot, it looks much more complicated than i was thinking. I have tried some request to change the value of the fields friend, in community users but nothing work.
I have tried to assign a default value in this field by php my admin, same problem.
as when a user create a new account, it will always be friend with the 667 users, is there any way to put 667 as default value for the friends fiels in all new account?
The 667 friends count will be wrong, but it s not a problem for me as this user is only here to send the first message in the stream.
the safety way you need to "copy" the function updateFriendCount from /components/com_community/model/friends.php line 62.
updateFriendCount need to be done for 667 and $userid (new user).