Commit 1d760538 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Updated for 1.4.1.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9427 b35dd754-fafc-0310-a699-88a17e54d16e
parent 327edcce
......@@ -44,6 +44,11 @@
Registration Plugin Changelog
</h1>
<p><b>1.4.1</b> -- November 2, 2007</p>
<ul>
<li>JIDs to alert of new registrations are now validated.</li>
</ul>
<p><b>1.4.0</b> -- April 12, 2007</p>
<ul>
<li>Now requires Openfire 3.3.0.</li>
......
......@@ -5,8 +5,8 @@
<name>Registration</name>
<description>Performs various actions whenever a new user account is created.</description>
<author>Ryan Graham</author>
<version>1.4.0</version>
<date>4/12/2007</date>
<version>1.4.1</version>
<date>11/2/2007</date>
<minServerVersion>3.3.0</minServerVersion>
<adminconsole>
......
......@@ -17,6 +17,7 @@ registration.props.form.registration_contacts_details=Add or remove contacts to
registration.props.form.registration_contact_removed=Contact successfully removed.
registration.props.form.registration_contact_added=Contact successfully added.
registration.props.form.registration_contact_missing=Contact missing.
registration.props.form.registration_remote_contact=Only local contacts can be added.
registration.props.form.registration_contact_not_found=Contact not found.
registration.props.form.registration_invalid_email=Invalid email address.
registration.props.form.registration_add_im=Add IM Contact
......
......@@ -14,6 +14,7 @@
org.jivesoftware.openfire.group.*,
org.jivesoftware.util.*"
errorPage="error.jsp"%>
<%@ page import="org.xmpp.packet.JID" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
......@@ -53,6 +54,14 @@
else {
contactIM = contactIM.trim().toLowerCase();
if(contactIM.contains("@")) {
if (!XMPPServer.getInstance().isLocal(new JID(contactIM))) {
errors.put("remoteContact", "remoteContact");
}
contactIM = contactIM.substring(0,contactIM.lastIndexOf("@"));
}
}
if (errors.isEmpty()) {
try {
XMPPServer.getInstance().getUserManager().getUser(contactIM);
plugin.addIMContact(contactIM);
......@@ -308,6 +317,19 @@ function addEmailContact() {
</table>
</div>
<% } else if (errors.containsKey("remoteContact")) { %>
<div class="jive-error">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="jive-icon"><img src="images/error-16x16.gif" width="16" height="16" border="0"></td>
<td class="jive-icon-label"><fmt:message key="registration.props.form.registration_remote_contact" /></td>
</tr>
</tbody>
</table>
</div>
<% } else if (errors.containsKey("userNotFound")) { %>
<div class="jive-error">
......
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