# Security and personal login (newbie)

**URL:** <https://forum.servoy.com/t/security-and-personal-login-newbie/11081>\
**Category:** Classic Servoy\
**Created:** [August 26, 2009, 5:36am UTC](https://forum.servoy.com/t/security-and-personal-login-newbie/11081 "2009-08-26T05:36:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CHAUMARET](https://avatars.discourse-cdn.com/v4/letter/c/ea5d25/32.png) [@CHAUMARET](https://forum.servoy.com/u/CHAUMARET)\
**Post date:** [August 26, 2009, 5:36am UTC](https://forum.servoy.com/t/security-and-personal-login-newbie/11081/1 "2009-08-26T05:36:58Z")

</div>

Hello,

I follow this the tutorial here [http://www.servoy.com/docs/servoy\_4/tutorials/servoy\_4\_securitySeriesHighRes/servoy\_4\_securitySeriesHighRes.html](http://www.servoy.com/docs/servoy_4/tutorials/servoy_4_securitySeriesHighRes/servoy_4_securitySeriesHighRes.html). I do exactly the same thing in my solution but it doesn’t work !

Here’s my code :

```auto
function btn_login()
{
var ok = security.login(globals.username, globals.password, new Array('users'))
	if (!ok){
	plugins.dialogs.showErrorDialog('Alors','Vérif','Accord');
}
}

```

If I use the “login control” inside Servoy it’s ok.

With the tutorial, if the password is wrong, no message, and the solution is open ! Same if the password is correct.

What I’m missing ?

Thank you for your kind help

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [August 26, 2009, 9:53am UTC](https://forum.servoy.com/t/security-and-personal-login-newbie/11081/2 "2009-08-26T09:53:05Z")

</div>

```auto
security.login(globals.username, globals.password, new Array('users'))

```

this is not correct, see security.login example:

```auto
var groups = new Array()
groups[0] = 'Administrators'; //normally these groups are for example received from LDAP
var user_uid = globals.email; //also this id 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?', '
}

```

so it is not the password that you send in but the user\_uuid how servoy knows your users. (if users do have uuids)

the security login is for your users (in your datamodel) that map on the servoy user (through the uuid)  
So that on both ends the same user is know.

---

<div class="post-metadata">

**Author:** ![CHAUMARET](https://avatars.discourse-cdn.com/v4/letter/c/ea5d25/32.png) [@CHAUMARET](https://forum.servoy.com/u/CHAUMARET)\
**Post date:** [August 26, 2009, 11:32am UTC](https://forum.servoy.com/t/security-and-personal-login-newbie/11081/3 "2009-08-26T11:32:46Z")

</div>

Thank you for your answer.
