Skip to content
Browse files

a bit of code to prevent users from messing up the testuser account

  • Loading branch information...
1 parent d85320d commit e36e30ed83188de746c9684431bf936a4ab936ea @rodsimpson rodsimpson committed Sep 11, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 js/app.js
View
10 js/app.js
@@ -244,9 +244,12 @@ $(document).ready(function () {
var name = $("#update-name").val();
var email = $("#update-email").val();
var username = $("#update-username").val();
- var oldpassword = $("#update-oldpassword").val();
- var newpassword = $("#update-newpassword").val();
-
+ var oldpassword = '';
+ var newpassword = '';
+ if (username != "testuser") {
+ var oldpassword = $("#update-oldpassword").val();
+ var newpassword = $("#update-newpassword").val();
+ }
if (Usergrid.validation.validateName(name, function (){
$("#update-name").focus();
$("#update-name").addClass('error');}) &&
@@ -398,7 +401,6 @@ $(document).ready(function () {
feed.resetEntityPointer();
while(feed.hasNextEntity()) {
var message = feed.getNextEntity();
- //var message = messages[i];
var created = message.get('created');
var content = message.get('content');
var actor = message.get('actor');

0 comments on commit e36e30e

Please sign in to comment.
Something went wrong with that request. Please try again.