Hi all.
I am new to SC.
I set up the Security Module: User and I am trying to customize the variables that get set on the On Validate Event.
Here is what I have:
$slogin = sc_sql_injection({login});
$spswd = sc_sql_injection(({pswd}));
$sql = "SELECT
user_seclevel,
is_super,
user_firstname,
user_email,
user_schoolid
FROM users
WHERE user_login = $slogin
AND user_password = ".$spswd;
sc_lookup(rs, $sql);
if(count({rs}) == 0)
{
sc_log_add(‘login Fail’, {lang_login_fail} . {login});
;
sc_error_message({lang_error_login});
}
else if({rs[0][1]} == ‘Y’)
{
[usr_login] = {login};
[usr_priv_admin] = {rs[0][0]};
[usr_name] = {rs[0][2]};
[usr_email] = {rs[0][3]};
[schoolid] = {rs[0][4]};
}
else
{
sc_error_message({lang_error_not_active});
sc_error_exit();
}
////
all of this code was generated by SC EXCEPT for the usr_schoolid in the Select statement and the [schoolid] = {rs[0][4]}; in the else if.
After I added the code, when I run the application it asks me to enter a value for schoolid before it will take me to the Login Application…
What did I do wrong?

