"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
{Sorry, I did this hours ago, I thought I submitted it after I previewed it, but obviously I did not ;(}
No, he teaches placeholders. I'm only in testing mode, I am trying to see if it works, then I'll modify it to be secure. Plus, this is the administration area, the public cannot get into this area, and I just don't know that it would work. I was very tired when I did that, and forgot that right above that, $row contained the record for that user, so I could get rid of the database lookup of the username, and just do it like this: $cust_username = $row->{username}; So that fixed all that part. Here is the code now: Yes, CWT::Site_DB is a module that I created. And if you clear the admin attribute, but it doesn't take effect until their next login, then are you checking for the attribute every time they request an admin page? Yes, it's checking the Session, EVERY time the page loads, if the session does not contain that line, then it don't give them any access to that page. Do the 'attr' and 'clear_attr' methods update the database immediately? YES, attr is used to retrieve and set data, and clear_attr is used to delete the session variable that I pass. I'm thinking of making it where I can pass multiple variables to it to delete, but right now, it only accepts one at a time to delete. So, is that code above still pretty bad? thx, Richard In reply to Re: Re: Sessions, Perl and MySQL
by powerhouse
|
|