#!/bin/bash
# info: get user value
# options: USER KEY
#
# The function for obtaining certain user's parameters.


#----------------------------------------------------------#
#                    Variable&Function                     #
#----------------------------------------------------------#

# Argument definition
user=$1
key=$(echo "$2"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")

# Includes
source $VESTA/func/main.sh


#----------------------------------------------------------#
#                    Verifications                         #
#----------------------------------------------------------#

check_args '2' "$#" 'USER KEY'
is_format_valid 'user'
is_object_valid 'user' 'USER' "$user"


#----------------------------------------------------------#
#                       Action                             #
#----------------------------------------------------------#

# Checking key
value=$(get_user_value "$key")

# Printing value
echo "$value"


#----------------------------------------------------------#
#                       Vesta                              #
#----------------------------------------------------------#

exit