Developer Area/Specifications in Development/New user probation
From Mahara Wiki
< Developer Area | Specifications in DevelopmentRevision as of 14:04, 4 March 2014 by Aaronw
This is a feature that was developed for mahara.org to reduce spam content on the page. We had a great deal of spam content created on the site, presumably with the goal of being cross-linked for search engine optimization purposes. In order to combat this, we implement a new user probation system, in which newly self-registered accounts cannot create publicly visible content containing links, thus making the site useless for SEO purposes.
- The launchpad bug: https://bugs.launchpad.net/mahara/+bug/1252101
- The gerrit patch: https://reviews.mahara.org/#/c/3065/
How it works
We add a newuserpoints column to the usr table. When a new user self-registers, this column is populated with a specific number of newuserpoints, stored in $CFG->probationthreshold. A user is considered "probationary" while their newuserpoints >= 1.
Probationary users are forbidden from creating content that would expose URLs or images to the outside world.
We use form validation to print an error and block their action if they try to place an image or URL into one of these:
- A comment
- A wall post
- A forum post
We hide controls to prevent them from taking these actions, which would make content public that could contain URLs:
- Making a group public
- Making a page public
- Creating secret URLs for a page