Example #1
0
# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU
# General Public License along with Exponent; if
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: saveprofile.php,v 1.7 2005/04/18 15:24:22 filetreefrog Exp $
##################################################
if (!defined('PATHOS')) {
    exit('');
}
if ($user) {
    if (!defined('SYS_USERS')) {
        require_once 'subsystems/users.php';
    }
    $user = pathos_users_update($_POST, $user);
    $user = pathos_users_saveUser($user);
    $user = pathos_users_saveProfileExtensions($_POST, $user, false);
    $_SESSION[SYS_SESSION_KEY]['user'] = $user;
    pathos_flow_redirect();
} else {
    echo SITE_403_HTML;
}
Example #2
0
            header('Location: ' . $_SERVER['HTTP_REFERER']);
        } else {
            $strength_error = pathos_security_checkPasswordStrength($_POST['username'], $_POST['pass1']);
            if ($strength_error != '') {
                $post = $_POST;
                unset($post['pass1']);
                unset($post['pass2']);
                $post['_formError'] = sprintf(TR_LOGINMODULE_STRENGTHFAILED, $strength_error);
                pathos_sessions_set('last_POST', $post);
                header('Location: ' . $_SERVER['HTTP_REFERER']);
            } else {
                // Finally, check the capcha
                if (SITE_USE_CAPTCHA && strtoupper($_POST['captcha_string']) != $capcha_real) {
                    $post = $_POST;
                    unset($post['captcha_string']);
                    $post['_formError'] = TR_LOGINMODULE_WRONGCAPTCHA;
                    pathos_sessions_set('last_POST', $post);
                    header('Location: ' . $_SERVER['HTTP_REFERER']);
                } else {
                    pathos_sessions_unset('capcha_string');
                    $u = pathos_users_create($_POST, null);
                    $u = pathos_users_saveProfileExtensions($_POST, $u, true);
                    pathos_users_login($_POST['username'], $_POST['pass1']);
                    pathos_flow_redirect();
                }
            }
        }
    }
} else {
    echo SITE_403_HTML;
}