on the class, can just do that in the view
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import uuid
+
from webob import Response, exc
from mediagoblin.db.util import ObjectId
Resend the activation email.
"""
-
- request.user.generate_new_verification_key()
+ request.user['verification_key'] = unicode(uuid.uuid4())
+ request.user.save()
# Copied shamelessly from the register view above.
return auth_lib.bcrypt_check_password(
password, self['pw_hash'])
- def generate_new_verification_key(self):
- """
- Create a new verification key, overwriting the old one.
- """
-
- self['verification_key'] = unicode(uuid.uuid4())
- self.save(validate=False)
-
class MediaEntry(Document):
__collection__ = 'media_entries'