user_options = $user_options; } /** * Retrieves user profile data. * * @since 1.0.0 * * @return array|bool Value set for the profile, or false if not set. */ public function get() { return $this->user_options->get( self::OPTION ); } /** * Saves user profile data. * * @since 1.0.0 * * @param array $data User profile data: email and photo. * @return bool True on success, false on failure. */ public function set( $data ) { return $this->user_options->set( self::OPTION, $data ); } /** * Verifies if user has their profile information stored. * * @since 1.0.0 * * @return bool True if profile is set, false otherwise. */ public function has() { $profile = (array) $this->get(); if ( ! empty( $profile['email'] ) && ! empty( $profile['photo'] ) ) { return true; } return false; } }