Page 1 of 1

Problem editing admin user

Posted: Sun Jun 27, 2010 5:33 pm
by eowynx
When I've tried to edit the administrator user, putting my own e-mail and name using the backend (dont see if password can be changed?) i got the following error:

"A PHP Error was encountered

Severity: Notice

Message: Undefined property: Users::$security

Filename: helpers/security_helper.php

Line Number: 43

Fatal error: Call to a member function xss_clean() on a non-object in /home/vivelibr/public_html/0_0CI/CIcore_2_0_0/helpers/security_helper.php on line 43".

Note: After the error, I'm browsing back to the edition of the user and the changes seem to be correctely saved.

Re: Problem editing admin user

Posted: Sun Jun 27, 2010 5:35 pm
by eowynx
Correction: the data was not updated at all

Re: Problem editing admin user

Posted: Sun Jun 27, 2010 7:50 pm
by dbashyal
That was CI 2.0 bug, which I didn't knew before as it was working fine in previous version and have fixed in new one, which is yet to release.

It can be fixed by adding:

Code: Select all

$this->load->library('security');
to a page, or can be globally turned on at: app/admin/config

Code: Select all

$config['global_xss_filtering'] = TRUE;
Thanks for notifying again!

Re: Problem editing admin user

Posted: Mon Jun 28, 2010 3:26 pm
by eowynx
Copied the line you say for admin/config at admin/config/config.php but still receiving the same error:
'A PHP Error was encountered

Severity: Notice

Message: Undefined property: Users::$security

Filename: helpers/security_helper.php

Line Number: 43

Fatal error: Call to a member function xss_clean() on a non-object in /home/vivelibr/public_html/0_0CI/CIcore_2_0_0/helpers/security_helper.php on line 43'

on trying to edit+update the user.

Regards :)

Re: Problem editing admin user

Posted: Mon Jun 28, 2010 3:29 pm
by eowynx
Right now modified this file: app/admin/config/autoload.php adding 'security' to the loaded libraries.

Doing this the administrator seems to update the data ok, my question is:

This autoloaded libraries will also load in the front-end? Cause my idea is to get the front-end so light as possible :)

Thanks again :)

Re: Problem editing admin user

Posted: Mon Jun 28, 2010 3:42 pm
by dbashyal
admin and frontend have separate autoload.php

You added on admin, so it will be loaded on admin pages only.