/** * Enhance function to check against duplicate emails * * @param string $user * @param array $changes * @return bool */ public function modifyUser($user, $changes) { global $conf; if (isset($changes['mail'])) { $found = $this->getUserByEmail($changes['mail']); if ($found != $user) { msg($this->getLang('emailduplicate'), -1); return false; } } $ok = parent::modifyUser($user, $changes); // refresh session cache touch($conf['cachedir'] . '/sessionpurge'); return $ok; }
/** * Modify user data [implement only where required/possible] * * Set the mod* capabilities according to the implemented features * * @param string $user nick of the user to be changed * @param array $changes array of field/value pairs to be changed (password will be clear text) * @return bool */ public function modifyUser($user, $changes) { return parent::modifyUser($user, $changes); }