akirk / friends

A social network between WordPresses. Privacy focused, by itself a self-hosted RSS++ reader with notifications.
https://wpfriends.at/
GNU General Public License v2.0
78 stars 13 forks source link

Bug: “Friend Requests” email notification checkbox does not update on Settings -> Notifications #311

Closed kgourlay closed 1 month ago

kgourlay commented 1 month ago

The checkbox for “Friend Requests” appears to always be blank, does not change when “Save Changes” is clicked. Fix by adding missing code to includes/class-admin in the process_admin_notification_manager() function:

        if ( isset( $_POST['friend_request_notification'] ) && $_POST['friend_request_notification'] ) {
            delete_user_option( get_current_user_id(), 'friends_no_friend_request_notification' );
        } else {
            update_user_option( get_current_user_id(), 'friends_no_friend_request_notification', 1 );
        }
cmdr-nova commented 1 month ago

Chiming in that this bug is quite disheartening as I'd like to follow people back via my blog, but can't risk killing my daily SendGrid limits.