We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 1e3d5f80 authored by Evan Prodromou's avatar Evan Prodromou

hide notice form if not able to post

parent fa45805d
......@@ -216,4 +216,23 @@ class RequireValidatedEmailPlugin extends Plugin
_m('Disables posting without a validated email address.'));
return true;
}
/**
* Hide the notice form if the user isn't able to post.
*
* @param Action $action action being shown
*
* @return boolean hook value
*/
function onStartShowNoticeForm($action)
{
$user = common_current_user();
if (!empty($user)) { // it's a remote notice
if (!$this->validated($user)) {
return false;
}
}
return true;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment