diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-09-08 12:42:32 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-09-08 12:42:32 +0000 |
| commit | 7d4b42c68ebc144be40615f080bb9fb674e152d1 (patch) | |
| tree | 8714882e4c8c1fea4c90a193040ef113bce12190 /phpBB/includes/ucp/ucp_activate.php | |
| parent | 924684b000a12f1089903eb0ef1c74dc05e1be53 (diff) | |
| download | forums-7d4b42c68ebc144be40615f080bb9fb674e152d1.tar forums-7d4b42c68ebc144be40615f080bb9fb674e152d1.tar.gz forums-7d4b42c68ebc144be40615f080bb9fb674e152d1.tar.bz2 forums-7d4b42c68ebc144be40615f080bb9fb674e152d1.tar.xz forums-7d4b42c68ebc144be40615f080bb9fb674e152d1.zip | |
Some re-arrangement of validation routines to improve extensibility
git-svn-id: file:///svn/phpbb/trunk@4487 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_activate.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_activate.php | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index 3c0a3fe698..9198a1c06e 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -1,23 +1,15 @@ <?php -/*************************************************************************** - * usercp_activate.php - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : support@phpbb.com - * - * $Id$ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ +// ------------------------------------------------------------- +// +// $Id$ +// +// FILENAME : usercp_activate.php +// STARTED : Mon May 19, 2003 +// COPYRIGHT : © 2001, 2003 phpBB Group +// WWW : http://www.phpbb.com/ +// LICENCE : GPL vs2.0 [ see /docs/COPYING ] +// +// ------------------------------------------------------------- class ucp_activate extends ucp { @@ -25,9 +17,11 @@ class ucp_activate extends ucp { global $censors, $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx; - $sql = "SELECT user_active, user_id, user_email, user_newpasswd, user_lang, user_actkey, username - FROM " . USERS_TABLE . " - WHERE user_id = " . intval($_GET['u']); + $user_id = (isset($_REQUEST['u'])) ? intval($_REQUEST['u']) : false; + + $sql = 'SELECT user_id, username, user_active, user_email, user_newpasswd, user_lang, user_actkey + FROM ' . USERS_TABLE . " + WHERE user_id = $user_id"; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) @@ -40,7 +34,7 @@ class ucp_activate extends ucp else if ($row['user_actkey'] == $_GET['k']) { $sql_update_pass = ($row['user_newpasswd'] != '') ? ", user_password = '" . $db->sql_escape($row['user_newpasswd']) . "', user_newpasswd = ''" : ''; -z + $sql = "UPDATE " . USERS_TABLE . " SET user_active = 1, user_actkey = ''" . $sql_update_pass . " WHERE user_id = " . $row['user_id']; @@ -84,7 +78,7 @@ z } else { - trigger_error($user->lang['No_such_user']); + trigger_error($user->lang['NO_USER']); } $db->sql_freeresult($result); } |
