[vhffs-dev] [2224] add a more friendly message when a user try to create a group with the same name as its username |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [2224] add a more friendly message when a user try to create a group with the same name as its username
- From: subversion@xxxxxxxxxxxxx
- Date: Thu, 17 Jan 2013 22:05:35 +0100
Revision: 2224
Author: gradator
Date: 2013-01-17 22:05:35 +0100 (Thu, 17 Jan 2013)
Log Message:
-----------
add a more friendly message when a user try to create a group with the same name as its username
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/Group.pm
Modified: trunk/vhffs-api/src/Vhffs/Panel/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Group.pm 2013-01-17 20:59:53 UTC (rev 2223)
+++ trunk/vhffs-api/src/Vhffs/Panel/Group.pm 2013-01-17 21:05:35 UTC (rev 2224)
@@ -298,6 +298,7 @@
if($submitted) {
# User posted the form, let's check it
+ $panel->add_error( gettext('The groupname must not be the same as your username') ) if $groupname eq $user->get_username;
$panel->add_error( gettext('Groupname must contain between 3 and 12 characters, only letters or numbers in lower case') ) unless $groupname =~ /^[a-z0-9]{3,12}$/;
$panel->add_error( gettext('You must enter a description') ) unless defined $description and $description !~ /^\s*$/;
$panel->add_error( gettext('You must enter a full name') ) unless defined $realname and $realname !~ /^\s*$/;