]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Issue 3636 request clarity for users without validated emails on instances with Requi...
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Aug 2012 17:52:14 +0000 (19:52 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 12 Aug 2013 10:56:40 +0000 (12:56 +0200)
plugins/RequireValidatedEmail/RequireValidatedEmailPlugin.php

index c14ace1f1e4be5c9e9aa72812e0dfe3e87297ecb..8cf57c57cda00699b51fad2e3084ad895dda5659 100644 (file)
@@ -240,18 +240,20 @@ class RequireValidatedEmailPlugin extends Plugin
     }
 
     /**
-     * Hide the notice form if the user isn't able to post.
+     * Show an error message about validating user email before posting
      *
+     * @param string $tag    Current tab tag value
      * @param Action $action action being shown
+     * @param Form   $form   object producing the form
      *
      * @return boolean hook value
      */
-    function onStartShowNoticeForm($action)
+    function onStartMakeEntryForm($tag, $action, &$form)
     {
         $user = common_current_user();
-        if (!empty($user)) { // it's a remote notice
+        if (!empty($user)) {
             if (!$this->validated($user)) {
-                return false;
+                $action->element('div', array('class'=>'error'), _('You must validate an email address before posting!'));
             }
         }
         return true;