Fixed an E_NOTICE on Special:UpdateProfile when $wgUserProfileThresholds is defined and removed an unused variable

Change-Id: I25391952bfff10d6a2e85c764338b7e85593f95b