private function _initializeProfile($userProfile) {
        die(print_r($userProfile));
        //validate that user profile has the correct information for password validation
        if (!is_array($userProfile)
            || !isset($userProfile['username'])
            || !isset($userProfile['password'])
            || !isset($userProfile['fullname'])			
            || !isset($userProfile['passhash'])
            || !is_string($userProfile['passhash'])
            || !isset($userProfile['passhist'])
            || !is_array($userProfile['passhist'])
            || !isset($userProfile['account_state'])
            || !isset($userProfile['policyinfo'])
            || !is_array($userProfile['policyinfo'])
            || !is_array($userProfile['platforminfo'])
        ) {
            throw new UserCredentialException('The user profile is not properly initialized', 1000);
        }
        
        //validate tenancy is a datetime
        if (array_key_exists('tenancy_expiry', $userProfile['policyinfo'])) {
            $tenancyExpiry = $userProfile['policyinfo']['tenancy_expiry'];
            
            if (($tenancyExpiry instanceof \DateTime) === false) {
                throw new UserCredentialException('The user profile is not properly initialized', 1000);
            }
        }
        
        //set a blank TOTP profile if not set
        if (!isset($userProfile['totpinfo'])) {
            $userProfile['totpinfo'] = array();
        }
        
        $this->_userProfile = $userProfile;
    }
private function _initializeProfile($userProfile) {
        die(print_r($userProfile));
        //validate that user profile has the correct information for password validation
        if (!is_array($userProfile)
            || !isset($userProfile['username'])
            || !isset($userProfile['password'])
            || !isset($userProfile['fullname'])			
            || !isset($userProfile['passhash'])
            || !is_string($userProfile['passhash'])
            || !isset($userProfile['passhist'])
            || !is_array($userProfile['passhist'])
            || !isset($userProfile['account_state'])
            || !isset($userProfile['policyinfo'])
            || !is_array($userProfile['policyinfo'])
            || !is_array($userProfile['platforminfo'])
        ) {
            throw new UserCredentialException('The user profile is not properly initialized', 1000);
        }
        
        //validate tenancy is a datetime
        if (array_key_exists('tenancy_expiry', $userProfile['policyinfo'])) {
            $tenancyExpiry = $userProfile['policyinfo']['tenancy_expiry'];
            
            if (($tenancyExpiry instanceof \DateTime) === false) {
                throw new UserCredentialException('The user profile is not properly initialized', 1000);
            }
        }
        
        //set a blank TOTP profile if not set
        if (!isset($userProfile['totpinfo'])) {
            $userProfile['totpinfo'] = array();
        }
        
        $this->_userProfile = $userProfile;
    }
private function _initializeProfile ( $ userProfile ) { die ( print_r ( $ userProfile ) ) ; //validate that user profile has the correct information for password validation
 if ( ! is_array ( $ userProfile ) || ! isset ( $ userProfile [ 'username' ] ) || ! isset ( $ userProfile [ 'password' ] ) || ! isset ( $ userProfile [ 'fullname' ] ) || ! isset ( $ userProfile [ 'passhash' ] ) || ! is_string ( $ userProfile [ 'passhash' ] ) || ! isset ( $ userProfile [ 'passhist' ] ) || ! is_array ( $ userProfile [ 'passhist' ] ) || ! isset ( $ userProfile [ 'account_state' ] ) || ! isset ( $ userProfile [ 'policyinfo' ] ) || ! is_array ( $ userProfile [ 'policyinfo' ] ) || ! is_array ( $ userProfile [ 'platforminfo' ] ) ) { throw new UserCredentialException ( 'The user profile is not properly initialized' , 1000 ) ; } //validate tenancy is a datetime
 if ( array_key_exists ( 'tenancy_expiry' , $ userProfile [ 'policyinfo' ] ) ) { $ tenancyExpiry = $ userProfile [ 'policyinfo' ] [ 'tenancy_expiry' ] ; if ( ( $ tenancyExpiry instanceof \ DateTime ) === false ) { throw new UserCredentialException ( 'The user profile is not properly initialized' , 1000 ) ; } } //set a blank TOTP profile if not set
 if ( ! isset ( $ userProfile [ 'totpinfo' ] ) ) { $ userProfile [ 'totpinfo' ] = array ( ) ; } $ this -> _userProfile = $ userProfile ; }
initializes the user profiles data as per the user credentials provided to the constructor method

Cyril Ogana <cogana@gmail.com> - 2015-07-18

@param  array / ArrayAccess  $userProfile

@access private
initializes the user profiles data as per the user credentials provided to the constructor method