Prestachopo Posted May 6, 2011 Share Posted May 6, 2011 I don't understand this statement, in admin/tabs/AdminEmployees.php: // test! :-) $dummy = 'This dummy is for bug in hightlight forum syntax'; // the first comment never hightlighted in orange // in public function postProcess() elseif (Tools::isSubmit('submitAddemployee')) { if ($cookie->id_employee == Tools::getValue('id_employee') && Tools::getvalue('active') == 0) { $this->_errors[] = Tools::displayError('You cannot disable or delete the last administrator account.'); return false; } } // etc... I have a profile id 5 (Employee whithout any admin permissions, nothing checked in permissions) if I click in 'My Preferences' I go to my profile form to edit, but if I submit any changes (or not) I view the error message because the statement above.Why this statement check if my status == 0 (when really is 1) treats me as an administrator and return???I think that need check $employee->isLastAdmin() before. Right?What do you think about this? Link to comment Share on other sites More sharing options...
Prestachopo Posted May 9, 2011 Author Share Posted May 9, 2011 Ok, the bug is a bad error message, must be like 'You cannot edit this/your profile settings' os something like that because I am not the last admin and can't disable or delete the profile settings.Many thanks :-)Best Regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now