mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
Use VModhash fatal param for over18 modhash check.
This commit is contained in:
@@ -135,12 +135,12 @@ class PostController(ApiController):
|
||||
return BoringPage(_("over 18?"),
|
||||
content = Over18()).render()
|
||||
|
||||
@validate(over18 = nop('over18'),
|
||||
uh = nop('uh'),
|
||||
@validate(VModhash(fatal=False),
|
||||
over18 = nop('over18'),
|
||||
dest = VDestination(default = '/'))
|
||||
def POST_over18(self, over18, uh, dest):
|
||||
def POST_over18(self, over18, dest):
|
||||
if over18 == 'yes':
|
||||
if c.user_is_loggedin and c.user.valid_hash(uh):
|
||||
if c.user_is_loggedin and not c.errors:
|
||||
c.user.pref_over_18 = True
|
||||
c.user._commit()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user