USR); $EMAIL = $data->EMAIL; if(strtolower($_POST['username']) == $USR) { # create new random password $random = createRandomPassword(); // $random = '1234'; # create backup createBak($file, GSUSERSPATH, GSBACKUSERSPATH); # create password change trigger file $flagfile = GSUSERSPATH . _id($USR).".xml.reset"; copy(GSUSERSPATH . $file, $flagfile); # change password and resave xml file $data->PWD = passhash($random); $status = XMLsave($data, GSUSERSPATH . $file); # send the email with the new password $subject = $site_full_name .' '. i18n_r('RESET_PASSWORD') .' '. i18n_r('ATTEMPT'); $message = "
". cl($SITENAME) ." ". i18n_r('RESET_PASSWORD') ." ". i18n_r('ATTEMPT').'
'; $message .= "". i18n_r('LABEL_USERNAME').": ". $USR."";
$message .= "
". i18n_r('NEW_PASSWORD').": ". $random."";
$message .= '
'. i18n_r('EMAIL_LOGIN') .': '.$SITEURL . $GSADMIN.'/