ElggUser::getNotificationSettings PHP Method

getNotificationSettings() public method

Returns users's notification settings [ 'email' => true, // enabled 'ajax' => false, // disabled ]
public getNotificationSettings ( ) : array
return array
    public function getNotificationSettings()
    {
        $settings = [];
        $methods = _elgg_services()->notifications->getMethods();
        foreach ($methods as $method) {
            $settings[$method] = (bool) $this->{"notification:method:{$method}"};
        }
        return $settings;
    }