• Resolved DreamStatic

    (@dreamstatic)


    I have just installed this neat plugin and the emails do not seem to be sending. Is there anything additional I need to enable, other than the Activity Log settings section? It is a private install, so only has two admin users. I would like to see all activity, so I chose “Activity Type does not equal User” since we won’t be adding anymore users.

    I see many lines of activity in the Activity Log section, but no email notifications. Thanks for creating such a useful plugin!!

    https://www.ads-software.com/plugins/aryo-activity-log/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter DreamStatic

    (@dreamstatic)

    That is odd, I would never had thought of a Theme causing email issues. But I did try and switch from P2 theme back to default theme and it did not make a difference. Thank you for the tip to try though. If I ever resolve it, I will post the resolution here for future viewers. ??

    Hi guys it seems that the functionality on the notification part is not yet complete

    Specifically on line 45 of the file class-aal-notifications.php located in
    wp-content/plugins/aryo-activity-log/classes/
    there is a case loop that checks for the conditions for sending an email

    if you add the following piece of code in the switch it will also send emails for the “user” “equals” condition

    `case ‘user’:
    if ( $n_value == $args[‘user_id’] )
    $notification_matched_rules[] = $notification_rule;
    break;`

    Hello.

    In my case, I wanted an email sent when a specific user logged in. The plugin was not sending emails because the type of action was not being checked. So I added the following just after statusx‘s code:

    case 'action-value':
    	if ( $n_value == $args['action'] )
    		$notification_matched_rules[] = $notification_rule;
    	break;

    It worked for me ??

    Sigor

    (@sigor)

    Hi there Allala.
    I have the same issue as you and would like the same fix. According to other posts here, I tried to look inside class-aal-notifications.php to add your piece of code but actually, I’m not sure it has to be add in this file and I don’t know where.
    Could you please be more specific to help me (and next ones) to add properly your code? Witch file and wtich line please – inside 2.2.6 plugin’s version?

    Thanks

    Allala

    (@allala)

    Hello Sigor.

    Sorry for the late answer, but here you have it.

    File: wp-content/plugins/aryo-activity-log/classes/class-aal-notifications.php
    Version: 2.2.6

    From line 44 to 49, you can find this:

    switch ( $n_key ) {
    case 'action-type':
    	if ( $n_value == $args['object_type'] )
    		$notification_matched_rules[] = $notification_rule;
    	break;
    }

    Change this block of code for the following:

    switch ( $n_key ) {
    case 'action-type':
    	if ( $n_value == $args['object_type'] )
    		$notification_matched_rules[] = $notification_rule;
    	break;
    case 'user':
    	if ( $n_value == $args['user_id'] )
    		$notification_matched_rules[] = $notification_rule;
    	break;
    case 'action-value':
    	if ( $n_value == $args['action'] )
    		$notification_matched_rules[] = $notification_rule;
    	break;
    }
Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Emails not sending?’ is closed to new replies.