Title: Force User Login
Author: smatric
Published: <strong>9 Tháng 11, 2011</strong>
Last modified: 28 Tháng 8, 2015

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://s.w.org/plugins/geopattern-icon/force-user-login-modified.svg)

# Force User Login

 Bởi [smatric](https://profiles.wordpress.org/smatric/)

[Tải về](https://downloads.wordpress.org/plugin/force-user-login-modified.1.0.2.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/force-user-login-modified/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/force-user-login-modified/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/force-user-login-modified/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/force-user-login-modified/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/force-user-login-modified/)

## Mô tả

This is a very small plugin that forces users to login before viewing any content.
This is done by checking if the user is logged in, and if not, redirecting them 
to the login page. Users attempting to view blog content via RSS are also authenticated
via HTTP Auth.

Modification: use get_site_url() to redirect to the login page properly when WordPress
is located in a subdirectory.

## Cài đặt

 1. Upload `force-login.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## Hỏi đáp

  Can I change where the user is redirected after logging in?

Yes! A variable called $redirect_to (line 33) is currently set to redirect the user
to the page they were trying to access. If you changed that line from

    ```
    $redirect_to = $_SERVER['REQUEST_URI'];
    ```

to

    ```
    $redirect_to = '/';
    ```

it would redirect the user to the home page.

## Đánh giá

Không có đánh giá nào cho plugin này.

## Người đóng góp & Lập trình viên

“Force User Login” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ smatric ](https://profiles.wordpress.org/smatric/)

[Dịch “Force User Login” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/force-user-login-modified)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/force-user-login-modified/),
check out [SVN repository](https://plugins.svn.wordpress.org/force-user-login-modified/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/force-user-login-modified/)
qua [RSS](https://plugins.trac.wordpress.org/log/force-user-login-modified/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 1.0.2

 * Tested with WordPress 4.3
 * Updated meta description
 * A screenshot added

## Meta

 *  Phiên bản **1.0**
 *  Cập nhật lần cuối **11 năm trước**
 *  Số lượt cài đặt **40+**
 *  Phiên bản WordPress ** 2.0.2 hoặc cao hơn **
 *  Đã kiểm tra lên đến **4.3.34**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/force-user-login-modified/)
 * Thẻ
 * [force user login](https://vi.wordpress.org/plugins/tags/force-user-login/)[login](https://vi.wordpress.org/plugins/tags/login/)
   [password](https://vi.wordpress.org/plugins/tags/password/)[privacy](https://vi.wordpress.org/plugins/tags/privacy/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/force-user-login-modified/advanced/)

## Đánh giá

Chưa có đánh giá nào được gửi.

[Your review](https://wordpress.org/support/plugin/force-user-login-modified/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/force-user-login-modified/reviews/)

## Những người đóng góp

 *   [ smatric ](https://profiles.wordpress.org/smatric/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/force-user-login-modified/)

## Ủng hộ

Bạn có muốn hỗ trợ vào sự phát triển của plugin này?

 [ Ủng hộ plugin này ](http://Don't%20worry%20about%20it)