Zubrag.com :: Forum

zubrag.com => Password Protect Advanced => Topic started by: kuzco on November 08, 2011, 03:27:22 PM



Title: Change profile
Post by: kuzco on November 08, 2011, 03:27:22 PM
Hello,
I am really satisfied with this great script - it is  more or less exactly the "user mgmt. solution with flat file" I was looking for.
Nevertheless I am 2 wishes and need therefore your help.

I will use this script for a user mgmt. solution without protecting pages aso. Script should manage user details for our student parties every 5 years. I have added more the 20 additional user parameters like birthay, street, zipcode, etc.

Ok, user is able to register, login and use password reminder. What I am missing is the option to edit and change his profile.
 
Means, how can I make sure that after register or login, user will see his profile and is able to change it ?

I have added a redirection location after login, but how to make sure that after login or register transfer username to the new php so that I can read the user.php.
How can I make sure, that the new profile is saved i users.php and the old will be deleted.

any hint is welcome

regards
kuzco


Title: Re: Change profile
Post by: kuzco on November 09, 2011, 08:03:36 AM
Hello,
it me again.

I am playing with login.php and have edited this php in a way, that after login the user will see his profile.
For this case I have changed the following
    // need to be redirected?
    if (isset($REDIRECTS[$login]) && !empty($REDIRECTS[$login])) {
    //  header('Location: '
    //         . ((REDIRECT_PREFIX != '') && (strpos($REDIRECTS[$login], 'http') !== false) ? '' : REDIRECT_PREFIX)
    //         . $REDIRECTS[$login]);
   my code - create form with all profile information

However, I believe this is not a good way.

So, instaead of using
    // need to be redirected?
    if (isset($REDIRECTS[$login]) && !empty($REDIRECTS[$login])) {
    //  header('Location: '
    //         . ((REDIRECT_PREFIX != '') && (strpos($REDIRECTS[$login], 'http') !== false) ? '' : REDIRECT_PREFIX)
    //         . $REDIRECTS[$login]);
   my code - create form with all profile information
I would like to open a new php (i.e. login_success.php), BUT how can I do this ? How can I open this new php incl. the paramater $login from login.php.

Any help appreciated.

regards
kuzco