Skip to content

Commit 1c03e24

Browse files
authored
Adding last name as option for backward issues with Blesta / WHMCS plugins (hestiacp#1504)
Confirmed and working fine with WHMCS
1 parent 21a2ead commit 1c03e24

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bin/v-add-user

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: add system user
3-
# options: USER PASSWORD EMAIL [PACKAGE] [NAME]
3+
# options: USER PASSWORD EMAIL [PACKAGE] [NAME] [LASTNAME]
44
# labels:
55
#
66
# example: v-add-user admin2 P4$$w@rD bgates@aol.com
@@ -18,7 +18,10 @@ password=$2; HIDE=2
1818
email=$3
1919
package=${4-default}
2020
name=$5
21-
21+
# Last name has been added for backward compatibility with WHMCS / Blesta VestaCP Plugins
22+
if [ ! -z "$6" ]; then
23+
name="$name $6";
24+
fi
2225
# Includes
2326
source $HESTIA/func/main.sh
2427
source $HESTIA/conf/hestia.conf

0 commit comments

Comments
 (0)