Servoy 9 warning "...is not applicable for..."

Hi!

I get the warning “The function login(String,Object,Array) is not applicable for the arguments (String,String,Array)”
in this login method in the authenticator modul:

function gm_login(vUser,vPwd) {
	//check if user name exists
	if(vUser){
		var vUid = security.getUserUID(vUser); //get the uuid
		//check if user exists
		if(vUid){
			//check if password exists
			if(vPwd){
				if(security.checkPassword(vUid,vPwd)){
					var vGroups = security.getGroups().getColumnAsArray(2); //'Administrator', 'Users'
					//login
					var ok = security.login(vUser,vUid,vGroups);
.
.

If I take the sample code for security.login():

var groups = new Array()
groups[0] = 'Administrators'; //normally these groups are for example received from LDAP
var user_uid = globals.email; //also this uid might be received from external authentication method
var ok = security.login(globals.username, user_uid, groups)
if (!ok) {
	plugins.dialogs.showErrorDialog('Login failure', 'Already logged in? or no user_uid/groups specified?', 'OK')
}

I get the same warnig!?
A little help would be nice for fixing this.

2 ways to solve this

cast it:

/**
  * @type {Array<String>}
  */
var groups = new Array();

or directly created it as a String array:

var groups = ['Administrators']

will update the sample.

Thank you Johan!

It works now without warnings:

/**
 *
 * @param {String} vUser
 * @param {String} vPwd
 * 
 * 
 * @properties={typeid:24,uuid:"C4ABD2B9-4550-4342-AF94-E636B0160193"}
 */
function gm_login(vUser,vPwd) {
	//check if user name exists
	if(vUser){
		var vUid = security.getUserUID(vUser); //get the uuid
		//check if user exists
		if(vUid){
			//check if password exists
			if(vPwd){
				if(security.checkPassword(vUid,vPwd)){
					/**
					 * @type {Array<string>}
					 */
					var vGroups = security.getGroups().getColumnAsArray(2); //'Administrators', 'Users'
					//login
					var ok = security.login(vUser,vUid,vGroups);
					if(ok == true){
						return 0;
					}
					else {
						return null;
					}
				}
				//password did not match
				else {
					return 1;
				}
			}
			//user did not enter password
			else {
				return 2;
			}
		}
		//user did not match in security
		else {
			return 3;
		}
	}
	//user did not enter user name
	else {
		return 4;
	}
}