Log in


  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2010-4-4
  • Downloads: 1866
  • Recommendations: 2


Previous releases:

Other Projects

View Cash's plugins

Messages Controls for Elgg 1.7

Admins can block users from using private messaging and users can set messaging to friends only

by Cash
Last updated 1478 days ago

This plugin is dedicated to Viral Sonawala.

With it you can do 2 things:

  • admins can edit start.php to add the guids of users who should not have access to private messaging
  • users can set it so that only friends can send them messages

Release Notes:

Elgg 1.7 or greater


  • Cash 1478 days ago

    One note: the friends only option works by catching the send action and blocking it. The messages plugin does not use the page handler for composing messages. If it did, I could stop the message before it is composed. Let's hope that gets fixed in a future version of Elgg.

  • [cim] 1478 days ago

    this is a great plugin for elgg sites with thousands of members, as spam gets attracted to busy websites, this could be a way to stop future spammers.

  • Cube 1478 days ago

    Big Big THX to you cash for sharing this. this plugin helps a bit more act against spam :)

  • GMA 1477 days ago


    Nice plug-in!

    I just want to ask that if a user sends his mail to a user whom he's not a friend of and the plug-in blocks it, I presume that there will be no database entry?  I asked this because it might indeed block the message from reaching a user whom he's not a friend of the sender thus protecting him from spam but if it still reach the database then your database is not protected from spam at all?  I am not a coder and I don't have any idea how the core of Elgg handles this so please enlighten.


  • Cash 1477 days ago

    @GMA - it blocks the message before the database objects are created.

  • Cube 1477 days ago


    is it possible to showing a message bevor user send a message to a user how accept only friends? By the way, this plugin works also in 1.6.1

    See what i mean:


  • Cash 1477 days ago

    @Cube - yes, you could override the form used in composing a message.

  • GMA 1477 days ago


    How about adding a feature which disables the "Send a message" action/option in the drop-down menu of the user icon.  The "Send a message" will be dimmed to know it has no link or it has been disabled/deactivated because the user has chosen to receive mails from friends only.

    What do you think?

  • GMA 1477 days ago


    Which one is better?

  • Cash 1477 days ago

    @slyhne - did not know about your plugin

    @GMA - slyhne's plugin has features like auto-refresh of the envelope icon/count that this plugin does not. That plugin is a modification of the messages plugin while this one operates in cooperation with the messages plugin. I think slyhne's does a better job telling the user before a message is written that the user is blocking it (if it is done from the avatar menu). I think this one is probably more foolproof on blocking the message from going out (though I might have missed something in the other plugin). The short answer is that it depends.

  • GMA 1477 days ago


    I tested slyhne's plug-in but it doesn't work.  The "Envelope" icon fron the topbar disappears.  The only way you can compose and send a message is by using the "Send a message" action in the avatar menu.  Since the "Envelope" icon is missing, there is no way you will get informed when you received a mail or notification!  I also tested the auto-refresh function and I set it at 10 seconds interval.  It was not also working,

    Can you integrate slyhne's auto-refresh to your plug-in?  And also a feature which deactivates or makes the "Send a message" unclickable in the avatar menu when a user chooses to receive mails from friends only.


  • Viral Sonawala 1476 days ago


    thanks for this. I should try this and thanks for your spending time on this. 

  • Tom 1473 days ago

    Gosh... at least he has humor ;))))

  • lord55 1471 days ago

    Can an Admin send a message to all (how can it possible in current elgg)? ,

    it can be useful if some admin don't like to use newsletter (or to have it by default in elgg), and integrate an option for  newsletter notification in notification settings if users want automatically receive them or not.

  • Cash 1471 days ago

    @lord55 - I know there are a few plugins around that offer mass mailing capabilities. This isn't one of them.

  • Viral Sonawala 1469 days ago

    not working in elgg 1.6.1

  • tennisbum 1447 days ago

    would this plugin work on 1.7 and 1.7.1 versions of elgg?

  • Sim2K 1430 days ago

    Works fine in 1.7.1

  • André Nichtern 1239 days ago

    ich suche ein plugin womit ich den usern die möglichkeit gebe einzelenen benutzern das schreiben von nachrichten zu verbieten

  • Chrisstoffer 1126 days ago

    Would really love is there were ever a simply "block" function made. I mean, it might just be one person you needed blocked and not all non-friends...

  • gugu 1038 days ago

    Thanks for this great plugin.
    but can I change it so it will be for friends only by default ?

  • Daniel1 687 days ago

    I'm using newest 1.8 version and this plugin is giving me an error message:

    Deprecated in 1.8: usersettings/messages_block/edit was deprecated in favor of plugins/messages_block/usersettings Called from [#11] /elgg/elgg-1.8.5/engine/lib/views.php:506

    Deprecated in 1.8: input/pulldown was deprecated by input/dropdown Called from [#15] /elgg/elgg-1.8.5/engine/lib/views.php:506

    Anyone could help me solve it?

  • kani 238 days ago

    i am using elgg-1.8.16 and added plugin in mod/messageboard 1.7 

    how can i find this path localhost/elgg-1.8.16/pg/messageboard/admin and any other plugin for messageboard