Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
Some WordPress sites make use of the very limited subscriber role, which basically let's someone edit their profile and login to do things like post comments on sites that require membership. In this video we look at how subscriber roles work.
-
0:00
The last user role that we'll look at here is subscriber.
-
0:04
Subscriber is a little different in that this person is only allowed to
-
0:08
edit their profile and can't edit any of the content on the site.
-
0:13
You might wonder then, why would we even have this role at all?
-
0:18
The reason is that on some sites, you want somebody to sign up on the site
-
0:22
before you grant them access to certain content
-
0:25
or certain abilities like the ability to comment.
-
0:30
So in this case, we would set up subscriber roles for
-
0:33
people to automatically register from the front end of the site.
-
0:37
And then have the ability to log in to
-
0:39
post comments, or to look at password-protected or hidden content.
-
0:44
To set this up, we're going to come to our site and log in as our admin role.
-
0:49
We then want to come down under General Settings,
-
0:55
and under Membership we're going to turn on the ability for people to sign up.
-
1:00
And make sure that they're automatically assigned the role of subscriber.
-
1:05
If this was changed, then anybody who registered on the site
-
1:08
would automatically become an administrator, which
-
1:10
would be a big security problem.
-
1:14
So we'll change it to subscriber and save our changes here.
-
1:19
And then we're gonna come, under Discussion Settings,
-
1:25
and we're going to require users to be registered and logged in to comment.
-
1:31
Now when we save these changes, and we log out of our site.
-
1:41
When we go to view the main site itself,
-
1:45
click over to the blog section, and
-
1:49
then go to Post a Reply for a comment.
-
1:53
We'll see a message that says you must be logged in.
-
1:57
I'm going to click on this Logged In link and it will
-
2:01
take me to the login page, which also has a link to register.
-
2:07
If we click on the register link, we can set
-
2:13
our username, and click Register, noticing
-
2:20
that the password will be emailed to you.
-
2:29
Since I entered a dummy email address, I can't actually go to that email address
-
2:35
to get the password, so I'm logging in as an admin, coming under Users.
-
2:42
So I'm going to click on subscriber, and then enter in a password.
-
2:49
[BLANK_AUDIO]
-
2:52
That I know and can save for my records.
-
2:54
[BLANK_AUDIO].
-
3:01
Once we have the tour subscriber user updated, let's log out and
-
3:05
go back to the site and try to post a comment again.
-
3:13
I'll come to my blog, click Reply, go
-
3:20
to Log In, put in my login information.
-
3:32
And then, I should be taken back to the site, to the same page, in order to post.
-
3:43
And I can submit my comment.
-
3:46
Based on how the discussion settings are set up,
-
3:49
that may or may not appear without having moderation first.
-
3:54
However, it does add this extra layer of not
-
3:57
just security, but also of community to your site.
-
4:01
We should now understand a pretty good overview of
-
4:05
how admin, editor, author, contributor, and subscriber roles work.
-
4:11
It is possible, with the use of custom
-
4:13
development or plugins, to customize these a little bit.
-
4:17
So let's take a look in the next video at how
-
4:20
we may be able to edit or tweak some of these roles.
You need to sign up for Treehouse in order to download course files.
Sign up