PHP User::confirmNewPassword Examples

PHP User::confirmNewPassword - 2 examples found. These are the top rated real world PHP examples of User::confirmNewPassword extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.confirm.php 1.3 03/12/04 17:58:15-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("confirm.tpl.html");
if (@$HTTP_GET_VARS['cat'] == 'newuser') {
    $res = @User::checkHash($HTTP_GET_VARS["email"], $HTTP_GET_VARS["hash"]);
    if ($res == 1) {
        User::confirmVisitorAccount($HTTP_GET_VARS["email"]);
        // redirect user to login form with pretty message
        Auth::redirect('index.php?err=8&email=' . $HTTP_GET_VARS["email"]);
        exit;
    }
    $tpl->assign("confirm_result", $res);
} elseif (@$HTTP_GET_VARS['cat'] == 'password') {
    $res = @User::checkHash($HTTP_GET_VARS["email"], $HTTP_GET_VARS["hash"]);
    if ($res == 1) {
        User::confirmNewPassword($HTTP_GET_VARS["email"]);
        $tpl->assign("email", $HTTP_GET_VARS["email"]);
    }
    $tpl->assign("confirm_result", $res);
}
$tpl->displayTemplate();
Example #2
0
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 51 Franklin Street, Suite 330                                          |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('confirm.tpl.html');
if (@$_GET['cat'] == 'newuser') {
    $res = @User::checkHash($_GET['email'], $_GET['hash']);
    if ($res == 1) {
        User::confirmVisitorAccount($_GET['email']);
        // redirect user to login form with pretty message
        Auth::redirect('index.php?err=8&email=' . $_GET['email']);
        exit;
    }
    $tpl->assign('confirm_result', $res);
} elseif (@$_GET['cat'] == 'password') {
    $res = @User::checkHash($_GET['email'], $_GET['hash']);
    if ($res == 1) {
        User::confirmNewPassword($_GET['email']);
        $tpl->assign('email', $_GET['email']);
    }
    $tpl->assign('confirm_result', $res);
}
$tpl->displayTemplate();