1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Stop New thread alerts while migrating

Discussion in 'XenForo Development Discussions' started by Pavan, Apr 2, 2015.

  1. Pavan

    Pavan New Member

    Hi All,

    Please help me in solving this problem. I have around 6000 threads to be created and i am using XENAPI to do that. For each thread/post created an alert is created and it is annoying all moderators and admins. Is there any way to stop alerts for all users for some time ?


    Regards,
    Pavan Patharde
     
  2. Daniel Hood

    Daniel Hood Well-Known Member

    The easiest and quickest way to do this would be to edit /library/XenForo/Model/Alert.php and find
    PHP:
    public static function userReceivesAlert(array $user$contentType$action)
    {
    and change it to
    PHP:
    public static function userReceivesAlert(array $user$contentType$action)
    {
    return 
    false;
    Remove the line that we just added when you want alerts to go back to normal. This is untested but I believe it'll work.
     
  3. Pavan

    Pavan New Member

    Hi @Daniel Hood ,

    Thanks for the answer. I have completed the import one week ago with active alerts :(

    Thank you for guidance.

    Let me try in next migration.
     
  4. Daniel Hood

    Daniel Hood Well-Known Member

    Sorry, didn't look at the date when I read the thread.
     

Share This Page