1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Bugtracker #3497 - force entry of email address if blank and required

This commit is contained in:
e107steved
2007-08-12 21:40:49 +00:00
parent 1916a6bf08
commit 743fa0a709
2 changed files with 12 additions and 7 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/class2.php,v $ | $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.20 $ | $Revision: 1.21 $
| $Date: 2007-04-30 21:00:10 $ | $Date: 2007-08-12 21:40:49 $
| $Author: e107coders $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
// //
@@ -1485,8 +1485,11 @@ if(!function_exists("print_a")) {
} }
} }
function force_userupdate() {
// Check that all required user fields (including extended fields) are valid.
// Return TRUE if update required
function force_userupdate()
{
global $sql,$pref,$currentUser; global $sql,$pref,$currentUser;
if (e_PAGE == "usersettings.php" || strpos(e_SELF, ADMINDIR) == TRUE) if (e_PAGE == "usersettings.php" || strpos(e_SELF, ADMINDIR) == TRUE)
@@ -1504,6 +1507,8 @@ function force_userupdate() {
} }
} }
if (!varset($pref['disable_emailcheck'],TRUE) && !trim($currentUser['user_email'])) return TRUE;
if($sql -> db_Select("user_extended_struct", "user_extended_struct_name", "user_extended_struct_required = '1'")) if($sql -> db_Select("user_extended_struct", "user_extended_struct_name", "user_extended_struct_required = '1'"))
{ {
while($row = $sql -> db_Fetch()) while($row = $sql -> db_Fetch())

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/usersettings_template.php,v $ | $Source: /cvs_backup/e107_0.8/e107_themes/templates/usersettings_template.php,v $
| $Revision: 1.3 $ | $Revision: 1.4 $
| $Date: 2007-07-23 20:06:05 $ | $Date: 2007-08-12 21:40:49 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -135,7 +135,7 @@ $USERSETTINGS_EDIT = "
{PASSWORD2} {PASSWORD2}
<tr> <tr>
<td style='width:40%' class='forumheader3'>".LAN_112."</td> <td style='width:40%' class='forumheader3'>".LAN_112.req(!$pref['disable_emailcheck'])."</td>
<td style='width:60%' class='forumheader2'> <td style='width:60%' class='forumheader2'>
{EMAIL} {EMAIL}
</td> </td>