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 @@ ...@@ -44,6 +44,11 @@
Registration Plugin Changelog Registration Plugin Changelog
</h1> </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> <p><b>1.4.0</b> -- April 12, 2007</p>
<ul> <ul>
<li>Now requires Openfire 3.3.0.</li> <li>Now requires Openfire 3.3.0.</li>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<name>Registration</name> <name>Registration</name>
<description>Performs various actions whenever a new user account is created.</description> <description>Performs various actions whenever a new user account is created.</description>
<author>Ryan Graham</author> <author>Ryan Graham</author>
<version>1.4.0</version> <version>1.4.1</version>
<date>4/12/2007</date> <date>11/2/2007</date>
<minServerVersion>3.3.0</minServerVersion> <minServerVersion>3.3.0</minServerVersion>
<adminconsole> <adminconsole>
......
...@@ -17,6 +17,7 @@ registration.props.form.registration_contacts_details=Add or remove contacts to ...@@ -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_removed=Contact successfully removed.
registration.props.form.registration_contact_added=Contact successfully added. registration.props.form.registration_contact_added=Contact successfully added.
registration.props.form.registration_contact_missing=Contact missing. 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_contact_not_found=Contact not found.
registration.props.form.registration_invalid_email=Invalid email address. registration.props.form.registration_invalid_email=Invalid email address.
registration.props.form.registration_add_im=Add IM Contact registration.props.form.registration_add_im=Add IM Contact
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
org.jivesoftware.openfire.group.*, org.jivesoftware.openfire.group.*,
org.jivesoftware.util.*" org.jivesoftware.util.*"
errorPage="error.jsp"%> 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/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
...@@ -53,6 +54,14 @@ ...@@ -53,6 +54,14 @@
else { else {
contactIM = contactIM.trim().toLowerCase(); 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 { try {
XMPPServer.getInstance().getUserManager().getUser(contactIM); XMPPServer.getInstance().getUserManager().getUser(contactIM);
plugin.addIMContact(contactIM); plugin.addIMContact(contactIM);
...@@ -308,6 +317,19 @@ function addEmailContact() { ...@@ -308,6 +317,19 @@ function addEmailContact() {
</table> </table>
</div> </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")) { %> <% } else if (errors.containsKey("userNotFound")) { %>
<div class="jive-error"> <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