<html><head>
				<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300italic,300,400italic,600,600italic,700,700italic,800,800italic" rel="stylesheet" type="text/css">
			</head>
			<body> 
				<strong><span style=" font-size: 30px; margon-bottom: 20px;">my</span><span style=" font-size: 30px; margon-bottom: 30px; color: #52b266;">Q</span><span style=" font-size: 30px; margon-bottom: 20px; ">uote</span></strong><br/><br/>
				
				O cerere de resetare a parolei a fost inaintata pentru contul: <br/><br/>

				<strong>User: </strong>' . $user_login . '<br/><br/>

				Daca aceasta cerere a fost inaintata din greseala, ignora acest email si parola nu se va schimba. <br/><br/>

				Pentru a reseta parola, viziteaza urmatoarea adresa: <br/><br/>

				<a href="' . tg_validate_url() . "action=reset_pwd&key={$key}&login="******">' . tg_validate_url() . "action=reset_pwd&key={$key}&login="******"color: #52b266;">Q</span>uote</strong>.<br/>
				Contact: <a href="mailto:info@myquote.ro">info@myquote.ro</a>; www.myquote.ro
			</body>
			</html>
			';
        if ($msg && !wp_mail($user_email, $subject, $msg, $headers)) {
            echo "<div class='error'>E-mail-ul a esuat dintr-un motiv necunoscut.</div>";
            exit;
        } else {
            echo "<div class='success'>Ti-am trimis un E-mail cu instructiuni de resetare a parolei.</div>";
Пример #2
0
        }
        $user_login = $user_data->user_login;
        $user_email = $user_data->user_email;
        $key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM {$wpdb->users} WHERE user_login = %s", $user_login));
        if (empty($key)) {
            //generate reset key
            $key = wp_generate_password(20, false);
            $wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $user_login));
        }
        //mailing reset details to the user
        $message = __('Someone requested that the password be reset for the following account:') . "\r\n\r\n";
        $message .= get_option('siteurl') . "\r\n\r\n";
        $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
        $message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
        $message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
        $message .= tg_validate_url() . "action=reset_pwd&key={$key}&login="******"\r\n";
        if ($message && !wp_mail($user_email, 'Password Reset Request', $message)) {
            echo "<div class='error'>Email failed to send for some unknown reason.</div>";
            exit;
        } else {
            echo "<div class='success'>We have just sent you an email with Password reset instructions.</div>";
            exit;
        }
    } else {
        get_header();
        get_template_part('navbar');
        ?>



    <div id="content">