TAILIEUCHUNG - Practical Web 2.0 Applications with PHP phần 3

Như đã đề cập trước đây, dòng đầu tiên của tập tin này sẽ được sử dụng như chủ đề e-mail. Điều này rất hữu ích, vì nó cho phép chúng tôi bao gồm logic mẫu trong chủ đề e-mail cũng như trong cơ thể. Chúng tôi sẽ bao gồm tên đầu tiên của người dùng trong đối tượng e-mail. | Simpo PDF Merge and Split Unregistered Version - http CHAPTER 4 USER REGISTRATION LOGIN AND LOGOUT 99 of DatabaseObject_User and the new initialization of the _newPassword property. This property must be public so the template can access its value. Listing 4-21. Creating a Pronounceable Password with Text_Password php class DatabaseObject_User extends Databaseobject . other code public _newPassword null . other code protected function preInsert this- _newPassword Text_Password create 8 this- password this- _newPassword return true . other code Finally we can create the template. As mentioned previously the first line of this file will be used as the e-mail subject. This is useful as it allows us to include template logic in the e-mail subject as well as in the body. We will include the user s first name in the e-mail subject. Listing 4-22 shows the contents of which is stored in . templates email. You may want to customize this template to suit your own requirements. Listing 4-22. The E-mail Template Used when New Users Register user- profile- first_name Thank You For Your Registration Dear user- profile- first_name Thank you for your registration. Your login details are as follows Login URL http phpweb20 account login Username user- username Password user- _newPassword Sincerely Web Site Administrator Simpo PDF Merge and Split Unregistered Version - http 100 CHAPTER 4 USER REGISTRATION LOGIN AND LOGOUT Figure 4-4 shows how the e-mail will look when received by the user. Hopefully the user s e-mail client will make the login URL clickable. You could choose to use an HTML e-mail instead but if the e-mail client can t automatically highlight links in a text e-mail it probably can t render HTML e-mails either. Figure 4-4. An example of the e-mail sent to a user when they register Implementing Account Login and Logout Now that users have a way of registering on the system .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.