Example #1
0
 function commandNewPassword()
 {
     if (SB_reqVal('pass1') != SB_reqVal('pass2')) {
         $this->error('The password was not repeated correctly!');
     }
     if ($this->hasErrors()) {
         $this->goBack();
         return;
     }
     require_once './inc/token.inc.php';
     $token = SB_Token::staticInstance();
     $uid = SB_reqVal('uid', true);
     if ($token->validate($uid, SB_reqVal('token', true))) {
         $token->invalidateTokens($uid);
         $this->um->changePassword($uid, SB_reqVal('pass1'));
         $this->reload = false;
         $this->close = false;
         $this->message = SB_T('Password has been changed!');
     } else {
         $this->commandInvalidToken();
     }
 }
Example #2
0
 function getVerificationUrl($uid = '')
 {
     if (!$uid) {
         $uid = $this->uid;
     }
     require_once './inc/token.inc.php';
     $token = SB_Token::staticInstance();
     return $token->createVerifyToken($uid);
 }
Example #3
0
<?php

/******************************************************************************
 *  SiteBar 3 - The Bookmark Server for Personal and Team Use.                *
 *  Copyright (C) 2005-2008  Ondrej Brablc <http://brablc.com/mailto?o>       *
 *                                                                            *
 *  This program is free software: you can redistribute it and/or modify      *
 *  it under the terms of the GNU Affero General Public License as published  *
 *  by the Free Software Foundation, either version 3 of the License, or      *
 *  (at your option) any later version.                                       *
 *                                                                            *
 *  This program is distributed in the hope that it will be useful,           *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
 *  GNU Affero General Public License for more details.                       *
 *                                                                            *
 *  You should have received a copy of the GNU Affero General Public License  *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
 ******************************************************************************/
require_once './inc/token.inc.php';
$token = SB_Token::staticInstance();
$token->validate(key($_GET), current($_GET), true);