CAESDO.Recruitment.Providers.CAESDOMembershipProvider.GetPasswordWithFormat C# (CSharp) Method

GetPasswordWithFormat() private method

Pulls out the password information for user identified by 'username', along with the password format, salt, and user approval information
private GetPasswordWithFormat ( string username, int &passwordFormat, int &status, string &passwordSalt, bool &userIsApproved ) : string
username string The 'username', aka EmailAddress, of the user
passwordFormat int Password format as an int
status int Status
passwordSalt string Salt of the password as a string
userIsApproved bool true if the user is approved
return string
        private string GetPasswordWithFormat(string username, out int passwordFormat, out int status, out string passwordSalt, out bool userIsApproved)
        {
            ArrayList fields = new ArrayList();
            fields.Add("PasswordFormat");
            fields.Add("Password");
            fields.Add("PasswordSalt");
            fields.Add("isActive");

            _dops.ResetDops();
            _dops.Sproc = "usp_getPasswordByUser";

            //Using Email as the username
            _dops.SetParameter("@Email", username, "IN");

            ArrayList results = new ArrayList();

            //default values
            passwordFormat = 0;
            passwordSalt = string.Empty;
            userIsApproved = false;
            status = 1;

            try
            {
                results = _dops.get_arrayList(fields);
            }
            catch (SqlException)
            {
                return string.Empty;
            }

            //If there is no password returned, then the user is not valid
            if (results.Count == 0)
            {
                status = 1; //user not found
                return string.Empty;
            }

            ArrayList resultsFirstRow = (ArrayList)results[0];

            passwordFormat = (int)resultsFirstRow[0];
            passwordSalt = (string)resultsFirstRow[2];
            userIsApproved = (bool)resultsFirstRow[3];

            status = 0;

            return (string)resultsFirstRow[1];
        }