I have my authentication working through the company LDAP server. I am
attempting to check for the existence of the user in a sqlite table and
add them and their role if they are not found. I do this during the login:
if ($username $password) {
# Attempt to log the user in
if
I'm not an expert but your check for existing user in the database should
be -find;
-search will return a resultset unless there is an exception.
Also, you may want this instead.
my $user = $c-model('authdb::User')-create({ username = $username });
$user-create_related('user_roles', {role='1'});
Ok, that worked, thank you, new users are being created. I think the
cookie thing is a non issue, now I need to feed the role column data into
the session so I can check it for access control.
Regards
Kenneth McLane
700 Locust St
Systems Compliance Services
Dubuque, 52001-6838
I1OB
USA