Support Forum

Autosubscribe not working

CA Carlos
Carlos
Member

Hi! The autosubscribe function is not working properly… i put  “Auto subscribe members to all topics they post in” checked but when they post they option appears unchecked… 

 

(any idea)

 

thanks! http://www.guitarraviva.com/foro

7 Answers

New Answer

CA Carlos
Carlos
Member

Ok… I have a little idea of what´s happening… I have a large forum (30.000 users) and I imported the users from BBPRESS… but installed this plugin LATER… so the option is only for NEW users… so none of those users will autosubscribe…

 

Is there any chance to solve this for ALL the users?

MP Mr Papa
Mr Papa
Member

sorry, correct – it will only apply to new users…  since users have to be able to opt out of that, you would have know way of knowing which already opted out and you might change their settings…

you would need to do it with a small php script that accesses the db… we can pass it along if interested…

CA Carlos
Carlos
Member

Yes, it would be nice to turn on “auto susbcribe” all the “old” users ¿Can you Help me?

MP Mr Papa
Mr Papa
Member

the script would look something like this:

$users = spdb_table(SFMEMBERS);
foreach ($users as $user) {
    $opts = unserialize($user->user_options);
    $opts[‘autosubpost’] = true;
    $opts = serialize($opts);
    spdb_query(“UPDATE “.SFMEMBERS.” SET user_options=’$opts’ WHERE user_id=$user->user_id”);
}

now, this is untested, so make a db backup beforehand in case something goes wrong…

CA Carlos
Carlos
Member

Hi think i have solve it… i did this on the SQL and it updated the options for all my current users… now they are “autosucribed” to every post they made and their time zone is working properly… not utc!

 

 UPDATE `wp_sfmembers` SET `user_options` = ‘a:9:{s:10:”hidestatus”;i:0;s:8:”timezone”;d:2;s:15:”timezone_string”;s:13:”Europe/Madrid”;s:6:”editor”;i:1;s:8:”namesync”;i:1;s:11:”unreadposts”;s:2:”50″;s:14:”mentionsoptout”;i:0;s:11:”autosubpost”;i:1;s:12:”autosubstart”;i:0;}’, `special_ranks` = NULL, `mentions` = NULL, `subscribe` = NULL, `forum_subscribe` = NULL 

MP Mr Papa
Mr Papa
Member

yes… as long as you adjusted the serialized string length for the timezone, which it appears you did, should be fine… hopefully, nobody had already updated their setings… ;)

MP Mr Papa
Mr Papa
Member

yes… as long as you adjusted the serialized string length for the timezone, which it appears you did, should be fine… hopefully, nobody had already updated their setings… ;)