public function save($overrideUsername = false) { global $db; if (empty($_POST['is_admin'])) { $this->is_admin = 0; } if (empty($_POST['is_acting_admin'])) { $this->is_acting_admin = 0; } // if someone is trying to make this user an admin, lets make sure they have permission to do so. $this->checkAdminFlags(); // if the site is configured to use the email addy as the username we need to force the // the email address into the username field. if (USER_REGISTRATION_USE_EMAIL == 1 && !empty($this->email) && $overrideUsername == false) { $this->username = $this->email; } parent::save(); }
public function save() { global $db; if (isset($_POST['section'])) { // manipulate section & location_data to correct values $hlpsection = $db->selectObject('sectionref', 'module = "helpController" AND source = "' . $_POST['section'] . '"'); $this->section = $hlpsection->section; $loc = null; $loc->mod = 'help'; $loc->src = $_POST['section']; $loc->int = ''; $this->location_data = serialize($loc); } // circumvent the re-ranking problem // $oldrank = $this->rank; // if (empty($this->rank)) unset($this->rank); parent::save(true); // if (!empty($oldrank)) $this->rank = $oldrank; // parent::save(); }