Welcome Guest, Not a member yet? Register   Sign In
how to fix this error?
#11

[eluser]chmod[/eluser]
[quote author="ppopowicz" date="1246989329"]First, nowhere in the above code do you set the sig_key in the session, so when the callback is being tested, it will return FALSE every time causing the validation to fail. Even then you are not requiring it in your validation rule.

Second, you didn't rework the code at all. You are still using the POST data to set variables before you are validating the data, which you are then using to make calls to the database.

Clean up your code, there are many more issues with the code than just the validation.[/quote]

my sig_key genrate in my view page.
http://192.168.134.135/sig/
the controller sig will set sig_key into the session(I using http://www.ledide.be/sig/sig_read_me.html source code).
so, when I validate sig_key, the sig_key is in the table ci_session.
this is true $this->session->userdata('sig_key') has a value because I can see it in the table;


if I submit username,password and sig_key(this will be a image, which is the URL http://192.168.134.135/sig/), the validation will be ok and passed.
but when I submit username, password,but not submit sig_key(not input a value), the error will be occur.

what can I do?
#12

[eluser]patrickpopowicz[/eluser]
What does your callback_checkUserPass return? Is it boolean, a string, object? I am able to test with the captcha library fine.
#13

[eluser]chmod[/eluser]
[quote author="ppopowicz" date="1247002119"]What does your callback_checkUserPass return? Is it boolean, a string, object? I am able to test with the captcha library fine.[/quote]

GOOD, it's right, My callback_checkUserPass return a object.

thanks you.




Theme © iAndrew 2016 - Forum software by © MyBB