Problem with Form Validation - Validation Rules in Config File |
[eluser]Unknown[/eluser]
Hi, as described in the Manual (http://ellislab.com/codeigniter/user-gui...ngtoconfig) i stored my Validation Rules in the Config File /config/form_validation.php and it works pretty fine. Now i would like to add some Conditions to those Rules: i.e. if the User is logged in use Rule A else use Rule B. I tried it this way: Code: if ( $this->session->userdata['id'] ) { /*rule a*/ } else { /*rule b*/ } but unfortunately this doesn't work; because obviously $this is unknown in that file, i get those notices/errors: Code: Undefined property: CI_Config::$session is there a way i can solve this? |
Welcome Guest, Not a member yet? Register Sign In |