Description

This function creates a new user and password for a protected directory.

Examples 




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$create_user = $cpanel->api1('Htaccess','set_pass', array('directoryname','user','12345luggage') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $create_user = $cpliveapi->api1('Htaccess','set_pass', ['directoryname','user','12345luggage'] ); # Call the function.

 


<cpanel Module="Htaccess::set_pass( $FORM('dir','user','pass') )">




cpapi1 --user=username Htaccess set_pass directoryname user 12345luggage


This function does not return output.



Parameters

ParameterTypeDescriptionPossible valuesExample

dir

string

Required

The directory name.

A valid directory name.directoryname
user string

Required

The new user's name.

A valid username.user
passstring

Required

The new user's password.

A secure password.12345luggage

Returns

This function does not return output.