[eluser]Peng Kong[/eluser]
ok another example. add check current password before letting user change password.
open account_password.php add in one more input file, call it "password_current_password"
look for the controller, it's the same name (duh), "account_password.php".
add in the validation rules, in the run() simply check before updating! use the authentication library's check_password() function. if fail remember to set the flashdata password_error to inform the user. note you can either do _info or _error depending on whether it's a success or failure. in the css _info is in green. _error is in red.