|
From: SourceForge.net <no...@so...> - 2005-06-26 15:10:12
|
Bugs item #1161813, was opened at 2005-03-12 05:02 Message generated for change (Comment added) made by mithyt2 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1161813&group_id=41586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core - Core Group: XOOPS 2.2.x >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Jan Pedersen (mithyt2) Summary: edituser.php allows change to a preexisting e-mail address Initial Comment: When you try to register using an e-mail address that someone has registered already, the system tells you (correctly) that the e-mail address is already in use. However, when you change the e-mail address of a pre-existing account to an address that's already in use, it doesn't tell you that the new e-mail address is already in use. Adding the following (based on the code in register.php) to the validation code in edituser.php solves the problem: $count = 0; if ( $email ) { $sql = "SELECT COUNT(*) FROM ".$xoopsDB->prefix('users')." where email='".$myts->makeTboxData4Save($email)."'"; $result = $xoopsDB->query($sql); list($count) = $xoopsDB->fetchRow($result); if ( $count > 0 ) { $errors[] = _US_EMAILTAKEN; } } ---------------------------------------------------------------------- >Comment By: Jan Pedersen (mithyt2) Date: 2005-06-26 17:10 Message: Logged In: YES user_id=841117 In XOOPS 2.2, changing an email address requires a response to an email sent to the new address. We will be improving on this procedure in future XOOPS versions ---------------------------------------------------------------------- Comment By: Jan Pedersen (mithyt2) Date: 2005-03-25 14:20 Message: Logged In: YES user_id=841117 OK, I'll take care of this one personally. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-03-21 00:39 Message: Logged In: NO Update: That should be something like: $count = 0; if ( $email ) { $sql = "SELECT COUNT(*) FROM ".$xoopsDB->prefix('users')." where email='".$myts->makeTboxData4Save($email)."'" and uid <> $uid; $result = $xoopsDB->query($sql); list($count) = $xoopsDB->fetchRow($result); if ( $count > 0 ) { $errors[] = _US_EMAILTAKEN; } } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1161813&group_id=41586 |