Wrote the scanning function into a method

Made sure DisableChangePassword gets updated