Change app for login

Hi everyone,
I have a problem with the security module.
I have an app that serves to log into the management system created with the scriptcase security module.
It works perfectly.
Now I would like to change this app to use an app control with the option “I would like to manually set the HTML template code” (see example login_03).
The problem is that when I copy the OnValidateSuccess code it doesn’t work.
From some tests I have noticed that these lines give problems
sc_apl_conf ($ rs-> fields [0], ‘insert’, has_priv ($ rs-> fields [1]));
sc_apl_conf ($ rs-> fields [0], ‘delete’, has_priv ($ rs-> fields [2]));
sc_apl_conf ($ rs-> fields [0], ‘update’, has_priv ($ rs-> fields [3]));
I guess it’s the fact that the app is not configured in the security module.
How can I go about solving this problem?
Thank you!